diff --git a/.github/workflows/check-internal-links.yml b/.github/workflows/check-internal-links.yml index 2aad431b..9f0f71d2 100644 --- a/.github/workflows/check-internal-links.yml +++ b/.github/workflows/check-internal-links.yml @@ -8,6 +8,9 @@ name: Internal Links # gate deterministic and free of network flakiness. on: + # Dispatched by the refresh workflows on the PR branch: PRs opened with + # GITHUB_TOKEN need explicit CI dispatches (#335, #337, #513). + workflow_dispatch: pull_request: branches: [main] paths: diff --git a/.github/workflows/hive-docs-refresh.yml b/.github/workflows/hive-docs-refresh.yml index b54a4726..8a03fcb0 100644 --- a/.github/workflows/hive-docs-refresh.yml +++ b/.github/workflows/hive-docs-refresh.yml @@ -18,7 +18,7 @@ env: # Workflows whose jobs are the required status checks on main. Each must # declare `on: workflow_dispatch` so this run can trigger them on the PR # branch (see "Trigger required checks" below). - REQUIRED_CHECK_WORKFLOWS: build.yml typecheck.yml vitest.yml npm-audit.yml + REQUIRED_CHECK_WORKFLOWS: build.yml typecheck.yml vitest.yml npm-audit.yml check-internal-links.yml markdownlint-cli2.yml jobs: refresh: @@ -64,8 +64,9 @@ jobs: This PR was opened with `GITHUB_TOKEN`, so GitHub does not start `pull_request` workflows for it. The refresh run instead dispatches - Build, TypeScript & Lint Check, Vitest and npm audit on the PR - branch; their check-runs land on the head SHA as usual. + Build, TypeScript & Lint Check, Vitest, npm audit, Internal Links + and Markdown Lint on the PR branch; their check-runs land on the + head SHA as usual. Refresh run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/.github/workflows/markdownlint-cli2.yml b/.github/workflows/markdownlint-cli2.yml index 6f92f393..f4213e76 100644 --- a/.github/workflows/markdownlint-cli2.yml +++ b/.github/workflows/markdownlint-cli2.yml @@ -1,6 +1,9 @@ name: Markdown Lint on: + # Dispatched by the refresh workflows on the PR branch: PRs opened with + # GITHUB_TOKEN need explicit CI dispatches (#335, #337, #513). + workflow_dispatch: pull_request: branches: [main] paths: diff --git a/.github/workflows/meeting-recordings-refresh.yml b/.github/workflows/meeting-recordings-refresh.yml index b532cc06..40e37a71 100644 --- a/.github/workflows/meeting-recordings-refresh.yml +++ b/.github/workflows/meeting-recordings-refresh.yml @@ -13,7 +13,7 @@ env: # Workflows whose jobs are the required status checks on main. Each must # declare `on: workflow_dispatch` so this run can trigger them on the PR # branch (see "Trigger required checks" below). - REQUIRED_CHECK_WORKFLOWS: build.yml typecheck.yml vitest.yml npm-audit.yml + REQUIRED_CHECK_WORKFLOWS: build.yml typecheck.yml vitest.yml npm-audit.yml check-internal-links.yml markdownlint-cli2.yml jobs: refresh: @@ -59,8 +59,9 @@ jobs: This PR was opened with `GITHUB_TOKEN`, so GitHub does not start `pull_request` workflows for it. The refresh run instead dispatches - Build, TypeScript & Lint Check, Vitest and npm audit on the PR - branch; their check-runs land on the head SHA as usual. + Build, TypeScript & Lint Check, Vitest, npm audit, Internal Links + and Markdown Lint on the PR branch; their check-runs land on the + head SHA as usual. Refresh run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} diff --git a/changelog.d/fixed-513-refresh-required-checks.md b/changelog.d/fixed-513-refresh-required-checks.md new file mode 100644 index 00000000..6232d5e7 --- /dev/null +++ b/changelog.d/fixed-513-refresh-required-checks.md @@ -0,0 +1,2 @@ +- Refresh PRs now dispatch Internal Links and Markdown Lint alongside the other + required checks, avoiding missing checks that stall automated merges (#513). diff --git a/src/__tests__/refresh-workflow-dispatch.test.ts b/src/__tests__/refresh-workflow-dispatch.test.ts index 1e4b9e39..59cb6e21 100644 --- a/src/__tests__/refresh-workflow-dispatch.test.ts +++ b/src/__tests__/refresh-workflow-dispatch.test.ts @@ -55,6 +55,19 @@ describe.each(REFRESH_WORKFLOWS)("%s dispatches required checks", refresh => { expect(required!.length).toBeGreaterThan(0); }); + it("includes every required PR check, including path-filtered checks", () => { + expect(required).toEqual( + expect.arrayContaining([ + "build.yml", + "typecheck.yml", + "vitest.yml", + "npm-audit.yml", + "check-internal-links.yml", + "markdownlint-cli2.yml", + ]) + ); + }); + it("iterates that list in the dispatch step", () => { expect(yaml).toMatch(/for wf in \$REQUIRED_CHECK_WORKFLOWS;/); expect(yaml).toMatch(/gh workflow run "\$wf"/);