Skip to content

ci: Normalize PR check workflows - #2120

Merged
marcleblanc2 merged 6 commits into
mainfrom
marc/check-comments-minimize-resolved
Oct 31, 2026
Merged

marcleblanc2 merged 6 commits into
mainfrom
marc/check-comments-minimize-resolved

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

The five PR check workflows (links, redirects, spelling, hostnames, duplicated content) each carried their own copy of the checkout, diff, run, and comment steps; this moves those into one composite action (.github/actions/pr-check) and shared scripts (dev/check-shared.mjs, dev/check-report.sh), so each workflow lists only what differs. A check no longer comments on a PR that never had findings, and once findings are fixed its summary comment is minimized as resolved, like the spell check already did.

marcleblanc2 and others added 2 commits October 30, 2026 18:29
The four bash checks each carried a copy of the same comment step, and none of them minimized the summary once the findings were fixed, unlike the spell check. dev/post-check-comment.sh now posts, updates, minimizes, and reopens the summary for all of them, and never comments on a PR that had nothing to report.

Also:
- result=found everywhere (links and redirects said broken)
- the clean message comes from the check script's report in every workflow, all saying 'This revision'
- the hostnames job name says (advisory) like the other advisory checks
- GH_TOKEN, PR_NUMBER, BASE_SHA, LINK_BASE, and RUN_URL are job-level env
- the check scripts are checked out from the merge commit, like the workflow file itself. A branch that predates a check has no script for it, so the check crashed and posted a 'could not run' comment on a clean PR (#2118); 27 open PRs predate check-duplicates.mjs
- vercel-ignore-build.sh names the Slack app manifest by its current name

Amp-Thread-ID: https://ampcode.com/threads/T-01a18f4b-0163-7216-a915-372c4b6288cb
Co-authored-by: Amp <amp@ampcode.com>
check-spelling.mjs takes --diff, --format markdown, --link-base, and --review like the other check scripts, and the workflow posts its summary with dev/post-check-comment.sh and its inline comments with dev/sync-review-comments.sh. That retires dev/post-spelling-review.mjs, which carried its own GitHub client, summary rendering, and review-comment sync.

The comment markers stay cspell-report and cspell-finding, so comments already on open PRs keep being updated. The workflow also gets the concurrency block the other checks have, so two pushes in a row stop racing each other's comments.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18f4b-0163-7216-a915-372c4b6288cb
Co-authored-by: Amp <amp@ampcode.com>
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Oct 31, 2026 1:44am UTC

Request Review

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

This comment has been minimized.

marcleblanc2 and others added 3 commits October 30, 2026 18:32
The five check workflows repeated the same checkout, diff, baseline, run,
and comment steps. .github/actions/pr-check now holds them once, and each
workflow sets only what differs. dev/check-shared.mjs holds the flag,
diff, file listing, baseline, and report code the five check scripts each
carried a copy of, and dev/report-check.sh replaces post-check-comment.sh
and sync-review-comments.sh. github-slugger is installed by the action
instead of by each workflow.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18f4b-0163-7216-a915-372c4b6288cb
Co-authored-by: Amp <amp@ampcode.com>
…checks, and check-report.sh like the other check scripts

The summary and inline comment markers were cspell-report and
cspell-finding; every other check uses its workflow name. Open PRs keep
their old cspell-report comment; delete those once this lands.

Amp-Thread-ID: https://ampcode.com/threads/T-01a18f4b-0163-7216-a915-372c4b6288cb
Co-authored-by: Amp <amp@ampcode.com>
@github-actions

This comment has been minimized.

@marcleblanc2 marcleblanc2 changed the title ci: Normalize the PR check workflows ci: Normalize PR check workflows Oct 31, 2026
@marcleblanc2
marcleblanc2 marked this pull request as ready for review October 31, 2026 02:30
@marcleblanc2
marcleblanc2 enabled auto-merge (squash) October 31, 2026 02:40
@marcleblanc2
marcleblanc2 merged commit f28c138 into main Oct 31, 2026
17 checks passed
@marcleblanc2
marcleblanc2 deleted the marc/check-comments-minimize-resolved branch October 31, 2026 16:15

This branch was successfully deployed

1 active deployment
Preview — 962d05d6 Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants