From 4698bff4e85a08f176904c9e5bdd8a75c2401f45 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 24 Mar 2026 13:08:10 +0000 Subject: [PATCH] Consolidate related workflows Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/workflows/release-gitflow.yml | 1 + .github/workflows/static_analysis.yaml | 2 + apps/desktop/.github/workflows/backport.yml | 34 ------ .../.github/workflows/pull_request.yaml | 14 --- .../.github/workflows/release-drafter.yml | 14 --- .../.github/workflows/release-gitflow.yml | 12 -- .../.github/workflows/static_analysis.yaml | 103 ------------------ .../desktop/.github/workflows/sync-labels.yml | 22 ---- .../.github/workflows/triage-incoming.yml | 16 --- .../.github/workflows/triage-labelled.yml | 12 -- .../.github/workflows/triage-stale.yml | 22 ---- 11 files changed, 3 insertions(+), 249 deletions(-) delete mode 100644 apps/desktop/.github/workflows/backport.yml delete mode 100644 apps/desktop/.github/workflows/pull_request.yaml delete mode 100644 apps/desktop/.github/workflows/release-drafter.yml delete mode 100644 apps/desktop/.github/workflows/release-gitflow.yml delete mode 100644 apps/desktop/.github/workflows/static_analysis.yaml delete mode 100644 apps/desktop/.github/workflows/sync-labels.yml delete mode 100644 apps/desktop/.github/workflows/triage-incoming.yml delete mode 100644 apps/desktop/.github/workflows/triage-labelled.yml delete mode 100644 apps/desktop/.github/workflows/triage-stale.yml diff --git a/.github/workflows/release-gitflow.yml b/.github/workflows/release-gitflow.yml index 406e421fdd..7985ba20d7 100644 --- a/.github/workflows/release-gitflow.yml +++ b/.github/workflows/release-gitflow.yml @@ -11,6 +11,7 @@ jobs: secrets: ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} with: + # This relates to the directory in which to reset dependencies, only web needs this dir: apps/web dependencies: | matrix-js-sdk diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index c26cd398b0..c26108bc80 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -107,6 +107,8 @@ jobs: labs|sliding_sync_description settings|voip|noise_suppression_description settings|voip|echo_cancellation_description + - name: Element Desktop + path: "apps/desktop" - name: Shared Components path: "packages/shared-components" name: "i18n Check (${{ matrix.name }})" diff --git a/apps/desktop/.github/workflows/backport.yml b/apps/desktop/.github/workflows/backport.yml deleted file mode 100644 index c770fb248a..0000000000 --- a/apps/desktop/.github/workflows/backport.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Backport -on: - # Privilege escalation necessary to enable backporting PRs from forks - # 🚨 We must not execute any checked out code here. - pull_request_target: # zizmor: ignore[dangerous-triggers] - types: - - closed - - labeled - branches: - - develop - -permissions: {} # We use ELEMENT_BOT_TOKEN instead - -jobs: - backport: - name: Backport - runs-on: ubuntu-24.04 - # Only react to merged PRs for security reasons. - # See https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target. - if: > - github.event.pull_request.merged - && ( - github.event.action == 'closed' - || ( - github.event.action == 'labeled' - && contains(github.event.label.name, 'backport') - ) - ) - steps: - - uses: tibdex/backport@9565281eda0731b1d20c4025c43339fb0a23812e # v2 - with: - labels_template: "<%= JSON.stringify([...labels, 'X-Release-Blocker']) %>" - # We can't use GITHUB_TOKEN here or CI won't run on the new PR - github_token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/apps/desktop/.github/workflows/pull_request.yaml b/apps/desktop/.github/workflows/pull_request.yaml deleted file mode 100644 index 685874e1a1..0000000000 --- a/apps/desktop/.github/workflows/pull_request.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: Pull Request -on: - # Privilege escalation necessary access members of the review teams - # 🚨 We must not execute any checked out code here, and be careful around use of user-controlled inputs. - pull_request_target: # zizmor: ignore[dangerous-triggers] - types: [opened, edited, labeled, unlabeled, synchronize] -permissions: {} -jobs: - action: - uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop # zizmor: ignore[unpinned-uses] - permissions: - pull-requests: write - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/apps/desktop/.github/workflows/release-drafter.yml b/apps/desktop/.github/workflows/release-drafter.yml deleted file mode 100644 index 84c7666ce1..0000000000 --- a/apps/desktop/.github/workflows/release-drafter.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Release Drafter -on: - push: - branches: [staging] - workflow_dispatch: {} -concurrency: ${{ github.workflow }} -permissions: {} -jobs: - draft: - uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop # zizmor: ignore[unpinned-uses] - permissions: - contents: write - with: - include-changes: element-hq/element-web~$VERSION diff --git a/apps/desktop/.github/workflows/release-gitflow.yml b/apps/desktop/.github/workflows/release-gitflow.yml deleted file mode 100644 index ac6fc8d80c..0000000000 --- a/apps/desktop/.github/workflows/release-gitflow.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Gitflow merge-back master->develop -name: Merge master -> develop -on: - push: - branches: [master] -concurrency: ${{ github.repository }}-${{ github.workflow }} -permissions: {} # Uses ELEMENT_BOT_TOKEN -jobs: - merge: - uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop # zizmor: ignore[unpinned-uses] - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/apps/desktop/.github/workflows/static_analysis.yaml b/apps/desktop/.github/workflows/static_analysis.yaml deleted file mode 100644 index 46a48ca61c..0000000000 --- a/apps/desktop/.github/workflows/static_analysis.yaml +++ /dev/null @@ -1,103 +0,0 @@ -name: Static Analysis -on: - pull_request: {} - push: - branches: [develop, master] -permissions: {} # No permissions needed -jobs: - ts_lint: - name: "Typescript Syntax Check" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - with: - node-version-file: package.json - cache: "pnpm" - - # Does not need branch matching as only analyses this layer - - name: Install Deps - run: "pnpm install --frozen-lockfile" - - - name: Typecheck - run: "pnpm run lint:types" - - i18n_lint: - name: "i18n Check" - uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@6eda3835118f3bc3fb658a1a3c20b7da9d16ae42 - permissions: - pull-requests: read - with: - hardcoded-words: "Element" - packageManager: pnpm - - js_lint: - name: "ESLint" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - with: - node-version-file: package.json - cache: "pnpm" - - # Does not need branch matching as only analyses this layer - - name: Install Deps - run: "pnpm install --frozen-lockfile" - - - name: Run Linter - run: "pnpm run lint:js" - - workflow_lint: - name: "Workflow Lint" - runs-on: ubuntu-24.04 - permissions: - security-events: write - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - with: - node-version-file: package.json - cache: "pnpm" - - # Does not need branch matching as only analyses this layer - - name: Install Deps - run: "pnpm install --frozen-lockfile" - - - name: Run Linter - run: "pnpm lint:workflows" - - - name: Run zizmor - uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2 - - analyse_dead_code: - name: "Analyse Dead Code" - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - - uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4 - - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 - with: - node-version-file: package.json - cache: "pnpm" - - - name: Install Deps - run: "pnpm install --frozen-lockfile" - - - name: Run linter - run: "pnpm run lint:knip" diff --git a/apps/desktop/.github/workflows/sync-labels.yml b/apps/desktop/.github/workflows/sync-labels.yml deleted file mode 100644 index bf2021c122..0000000000 --- a/apps/desktop/.github/workflows/sync-labels.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Sync labels -on: - workflow_dispatch: {} - schedule: - - cron: "0 2 * * *" # 2am every day - push: - branches: - - develop - paths: - - .github/labels.yml -permissions: {} # Uses ELEMENT_BOT_TOKEN -jobs: - sync-labels: - uses: element-hq/element-meta/.github/workflows/sync-labels.yml@7f2f93fb9b52ece7a0998f60e64862aa203c1746 - with: - LABELS: | - element-hq/element-web - .github/labels.yml - DELETE: true - WET: true - secrets: - ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/apps/desktop/.github/workflows/triage-incoming.yml b/apps/desktop/.github/workflows/triage-incoming.yml deleted file mode 100644 index 9571b78f06..0000000000 --- a/apps/desktop/.github/workflows/triage-incoming.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Move new issues into Issue triage board - -on: - issues: - types: [opened] - -permissions: {} # Uses ELEMENT_BOT_TOKEN - -jobs: - automate-project-columns-next: - runs-on: ubuntu-24.04 - steps: - - uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2 - with: - project-url: https://github.com/orgs/element-hq/projects/120 - github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/apps/desktop/.github/workflows/triage-labelled.yml b/apps/desktop/.github/workflows/triage-labelled.yml deleted file mode 100644 index 69d3977807..0000000000 --- a/apps/desktop/.github/workflows/triage-labelled.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Move labelled issues to correct projects - -on: - issues: - types: [labeled] - -permissions: {} # Uses ELEMENT_BOT_TOKEN - -jobs: - call-triage-labelled: - uses: element-hq/element-web/.github/workflows/triage-labelled.yml@develop # zizmor: ignore[unpinned-uses] - secrets: inherit # zizmor: ignore[secrets-inherit] diff --git a/apps/desktop/.github/workflows/triage-stale.yml b/apps/desktop/.github/workflows/triage-stale.yml deleted file mode 100644 index 61d882d36e..0000000000 --- a/apps/desktop/.github/workflows/triage-stale.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Close stale PRs -on: - workflow_dispatch: {} - schedule: - - cron: "30 1 * * *" -permissions: {} -jobs: - close: - runs-on: ubuntu-24.04 - permissions: - actions: write - issues: write - pull-requests: write - steps: - - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10 - with: - operations-per-run: 250 - days-before-issue-stale: -1 - days-before-issue-close: -1 - days-before-pr-stale: 180 - days-before-pr-close: 0 - close-pr-message: "This PR has been automatically closed because it has been stale for 180 days. If you wish to continue working on this PR, please ping a maintainer to reopen it."