From 10d7bdf9a17135389fc9ea465a58ebdc6acc3fd4 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 10 Jan 2022 12:57:27 +0000 Subject: [PATCH 1/6] Fix spacing errors (#20437) --- package.json | 4 ++-- yarn.lock | 36 ++++++++++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d46df07025..f8d907f27c 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "dependencies": { "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz", "browser-request": "^0.3.3", - "eslint-plugin-import": "^2.25.2", "gfm.css": "^1.1.2", "jsrsasign": "^10.2.0", "katex": "^0.12.0", @@ -111,7 +110,8 @@ "dotenv": "^10.0.0", "eslint": "7.18.0", "eslint-config-google": "^0.14.0", - "eslint-plugin-matrix-org": "github:matrix-org/eslint-plugin-matrix-org#48ec1e6af2cfb8310b9a6e23edf2dc7a26ddd580", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-matrix-org": "^0.4.0", "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.2.0", "extract-text-webpack-plugin": "^4.0.0-beta.0", diff --git a/yarn.lock b/yarn.lock index a4ccb313e6..4f30f99a0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4747,6 +4747,14 @@ eslint-module-utils@^2.7.1: find-up "^2.1.0" pkg-dir "^2.0.0" +eslint-module-utils@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129" + integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg== + dependencies: + debug "^3.2.7" + find-up "^2.1.0" + eslint-plugin-import@^2.25.2: version "2.25.3" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz#a554b5f66e08fb4f6dc99221866e57cfff824766" @@ -4766,9 +4774,29 @@ eslint-plugin-import@^2.25.2: resolve "^1.20.0" tsconfig-paths "^3.11.0" -"eslint-plugin-matrix-org@github:matrix-org/eslint-plugin-matrix-org#48ec1e6af2cfb8310b9a6e23edf2dc7a26ddd580": - version "0.3.5" - resolved "https://codeload.github.com/matrix-org/eslint-plugin-matrix-org/tar.gz/48ec1e6af2cfb8310b9a6e23edf2dc7a26ddd580" +eslint-plugin-import@^2.25.4: + version "2.25.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" + integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.2" + has "^1.0.3" + is-core-module "^2.8.0" + is-glob "^4.0.3" + minimatch "^3.0.4" + object.values "^1.1.5" + resolve "^1.20.0" + tsconfig-paths "^3.12.0" + +eslint-plugin-matrix-org@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-matrix-org/-/eslint-plugin-matrix-org-0.4.0.tgz#de2d2db1cd471d637728133ce9a2b921690e5cd1" + integrity sha512-yVkNwtc33qtrQB4PPzpU+PUdFzdkENPan3JF4zhtAQJRUYXyvKEXnYSrXLUWYRXoYFxs9LbyI2CnhJL/RnHJaQ== eslint-plugin-react-hooks@^4.2.0: version "4.3.0" @@ -12218,7 +12246,7 @@ trough@^1.0.0: resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== -tsconfig-paths@^3.11.0: +tsconfig-paths@^3.11.0, tsconfig-paths@^3.12.0: version "3.12.0" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== From 2617b424ce7c3e3392f8d5bfbb19c42add320259 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 11 Jan 2022 02:06:18 -0700 Subject: [PATCH 2/6] Fix git protocol usage (#20464) Prevents this: ``` + git clone git://github.com/matrix-org/matrix-js-sdk.git matrix-js-sdk --branch develop --depth 1 Cloning into 'matrix-js-sdk'... fatal: remote error: The unauthenticated git protocol on port 9418 is no longer supported. Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information. ``` --- scripts/fetch-develop.deps.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/fetch-develop.deps.sh b/scripts/fetch-develop.deps.sh index 421656ed94..0d999048dd 100755 --- a/scripts/fetch-develop.deps.sh +++ b/scripts/fetch-develop.deps.sh @@ -25,7 +25,7 @@ function clone() { if [ -n "$branch" ] then echo "Trying to use $org/$repo#$branch" - git clone git://github.com/$org/$repo.git $repo --branch $branch \ + git clone https://github.com/$org/$repo.git $repo --branch $branch \ "${GIT_CLONE_ARGS[@]}" return $? fi From 2d548d1179b4b48b8415058616bd1b843b26db00 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 11 Jan 2022 10:49:07 +0000 Subject: [PATCH 3/6] Print out requested teams in review-request workflow (#20471) --- .github/workflows/triage-move-review-requests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index 3fcf851944..c4827b2b7a 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -39,6 +39,10 @@ jobs: else echo "::set-output name=match::true" fi + - id: print_requested_teams_slug + run: | + echo 'github.event.pull_request.requested_teams.slug = ${{ github.event.pull_request.requested_teams.slug }}' + echo 'github.event.pull_request.requested_reviewers = ${{ github.event.pull_request.requested_reviewers }}' - uses: octokit/graphql-action@v2.x id: add_to_project if: > From c27cdcf849c64fe308fa867d9a089bfcbe7ed272 Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 11 Jan 2022 11:16:52 +0000 Subject: [PATCH 4/6] In review-request action, treat requested_teams as an array (#20474) --- .../workflows/triage-move-review-requests.yml | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index c4827b2b7a..b596b41fab 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -28,26 +28,30 @@ jobs: env: TEAM: "design" GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - - id: any_reviewers_in_the_team + - id: any_matching_reviewers run: | + # Fetch requested reviewers, and people who are on the team echo '${{ tojson(fromjson(steps.find_team_members.outputs.data).organization.team.members.nodes[*].login) }}' | tee /tmp/team_members.json echo '${{ tojson(github.event.pull_request.requested_reviewers[*].login) }}' | tee /tmp/reviewers.json jq --raw-output .[] < /tmp/team_members.json | sort | tee /tmp/team_members.txt jq --raw-output .[] < /tmp/reviewers.json | sort | tee /tmp/reviewers.txt - if [ $(join /tmp/team_members.txt /tmp/reviewers.txt | wc -l) = 0 ]; then - echo "::set-output name=match::false" - else + + # Fetch requested team reviewers, and the name of the team + echo '${{ tojson(github.event.pull_request.requested_teams[*].slug) }}' | tee /tmp/team_reviewers.json + jq --raw-output .[] < /tmp/team_reviewers.json | sort | tee /tmp/team_reviewers.txt + echo '${{ env.TEAM }}$' | tee /tmp/team.txt + + # If either a reviewer matches a team member, or a team matches our team, say "true" + if [ $(join /tmp/team_members.txt /tmp/reviewers.txt | wc -l) != 0 ]; then echo "::set-output name=match::true" + elif [ $(join /tmp/team.txt /tmp/team_reviewers.txt | wc -l) != 0 ]; then + echo "::set-output name=match::true" + else + echo "::set-output name=match::false" fi - - id: print_requested_teams_slug - run: | - echo 'github.event.pull_request.requested_teams.slug = ${{ github.event.pull_request.requested_teams.slug }}' - echo 'github.event.pull_request.requested_reviewers = ${{ github.event.pull_request.requested_reviewers }}' - uses: octokit/graphql-action@v2.x id: add_to_project - if: > - (steps.any_reviewers_in_the_team.outputs.match == 'true') || - (github.event.pull_request.requested_teams.slug == env.TEAM) + if: steps.any_matching_reviewers.outputs.match == 'true' with: headers: '{"GraphQL-Features": "projects_next_graphql"}' query: | From 672ca16428a4a9c65fbb1b77a1bfd89ddf6a71fc Mon Sep 17 00:00:00 2001 From: Ankur Date: Tue, 11 Jan 2022 16:53:14 +0530 Subject: [PATCH 5/6] Added a workflow to remove Z-Labs label. (#20465) Signed-off-by: ankur12-1610 --- .github/workflows/triage-move-unlabelled.yml | 26 ++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/triage-move-unlabelled.yml b/.github/workflows/triage-move-unlabelled.yml index 5a10cb2376..c32c35d37b 100644 --- a/.github/workflows/triage-move-unlabelled.yml +++ b/.github/workflows/triage-move-unlabelled.yml @@ -33,3 +33,29 @@ jobs: project: Issue triage column: Triaged repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }} + + remove_Z-Labs_label: + name: Remove Z-Labs label when features behind labs flags are removed + runs-on: ubuntu-latest + if: > + !(contains(github.event.issue.labels.*.name, 'A-Maths') || + contains(github.event.issue.labels.*.name, 'A-Message-Pinning') || + contains(github.event.issue.labels.*.name, 'A-Threads') || + contains(github.event.issue.labels.*.name, 'A-Polls') || + contains(github.event.issue.labels.*.name, 'A-Location-Sharing') || + contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') || + contains(github.event.issue.labels.*.name, 'Z-Maximised-Widgets') || + contains(github.event.issue.labels.*.name, 'Z-IA') || + contains(github.event.issue.labels.*.name, 'A-Themes-Custom') || + contains(github.event.issue.labels.*.name, 'A-E2EE-Dehydration') || + contains(github.event.issue.labels.*.name, 'A-Tags')) + steps: + - uses: actions/github-script@v5 + with: + script: | + github.rest.issues.removeLabel({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + name: ['Z-Labs'] + }) \ No newline at end of file From f434bb9f20888f76e2b4612bfb4548980d0b7aae Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Tue, 11 Jan 2022 11:38:19 +0000 Subject: [PATCH 6/6] Supply team name to review-request action (#20477) --- .github/workflows/triage-move-review-requests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/triage-move-review-requests.yml b/.github/workflows/triage-move-review-requests.yml index b596b41fab..86f922ca67 100644 --- a/.github/workflows/triage-move-review-requests.yml +++ b/.github/workflows/triage-move-review-requests.yml @@ -49,6 +49,8 @@ jobs: else echo "::set-output name=match::false" fi + env: + TEAM: "design" - uses: octokit/graphql-action@v2.x id: add_to_project if: steps.any_matching_reviewers.outputs.match == 'true'