Commit graph

15 commits

Author SHA1 Message Date
Wolfgang Walther 486756d85c
ci/github-script/commits: shorten and clarify review comment
Also following the one-sentence-per-line rule now.
2025-07-16 15:47:19 +02:00
Wolfgang Walther c4496912fd
ci/github-script/commits: fix job_url
This broke when we moved the check-cherry-picks workflow into the bigger
PR workflow. At this time, the "workflow run" became the whole PR
workflow, which includes many more than just 1 job, thus the assumption
in `jobs[0]` doesn't hold anymore.
2025-07-16 15:47:18 +02:00
Wolfgang Walther 1fbcad0434
ci/github-script/commits: block on errors
Most of the checks we do for cherry-picks are dismissable warnings, with
one exception: When a commit hash has been found, but this hash is not
available in any of the pickable branches, we raise this with
severity=error. This should also *block* the merge and not be
dismissable. That's because this is a fixable issue in every case.
2025-07-16 15:47:17 +02:00
Wolfgang Walther b19798c8b0
ci/github-script/commits: keep formatting for diffs of markdown blocks
Previously, when the diff contained a context line with ```, this would
end the code block and entirely break the markdown rendering.

Now we use the html code blocks provided by `core.summary` and properly
escape the content, so that it never escapes via html tags.
2025-07-16 12:15:07 +02:00
Wolfgang Walther 40dcbb1483
ci/github-script/commits: ignore whitespace on diff
This reduces noise that the cherry-pick reviews produce when formatting
related conflicts had to be resolved. We only do this in the
length-limited review comment, though. All changes, including
whitespace, can still be double-checked in the job log if needed.
2025-07-16 11:59:28 +02:00
Wolfgang Walther 84925b35c4
ci/github-script/commits: add comment about --creation-factor 2025-07-16 11:58:08 +02:00
Wolfgang Walther b46cb23251
ci/github-script/commits: init from ci/check-cherry-picks
This turns the check-cherry-pick script into a github-script based
JavaScript program. This makes it much easier to extend to check reverts
or merge commits later on.
2025-07-16 11:50:13 +02:00
Wolfgang Walther 2433050fb7
ci/github-script: use real @actions/core
This allows building markdown summaries, which is hard to mock.
2025-07-15 15:09:02 +02:00
Wolfgang Walther cdd1931ace
ci/github-script: add gh dependency to dev shell 2025-07-15 12:19:41 +02:00
Wolfgang Walther d71b8c3680
ci/github-script: allow running without dry mode 2025-07-14 13:49:41 +02:00
Wolfgang Walther 97d4103946
ci/github-script: allow running for single PR
Makes specific tests in the upstream repo easier to do.
2025-07-14 13:49:40 +02:00
Wolfgang Walther 2192c5b6e8
ci/github-script: extract common withRateLimit.js
This can and should be re-used across different scripts.
2025-07-14 13:49:39 +02:00
Wolfgang Walther d11eba1e1d
ci/github-script: default to commonjs
Since all github-scripts need to be written in commonjs, we now default
to it by not setting package.json. Support from editors for .js files is
slightly better than .cjs. To still allow using module imports in the
test runner script, we trick node into loading the script itself as a
module again via `--import ./run`.
2025-07-14 10:35:18 +02:00
Wolfgang Walther aaaabe0cb7
ci/github-script: add commander CLI interface
This makes it easier to add additional features.
2025-07-14 10:35:17 +02:00
Wolfgang Walther 6f6c625026
ci/github-script: move from ci/labels
This just moves things around to use less specific naming - `labels` is
only *one* script that can potentially be run locally while still being
written in github-script. Later, we can add more.
2025-07-14 10:35:13 +02:00