feat: add skip-actors bypass for bot PRs (#32) - #33
Conversation
b10fb68 to
53f887c
Compare
feat: add skip-actors and skip-labels bypass for bot/exempt PRs (#32) Dependabot-opened PRs fail the default checks: they never link an issue, and their default title (Bump X from Y to Z) is not a conventional commit. Add two bypass inputs that skip all checks and report a pass: - skip-actors: comma-separated PR-author logins (default dependabot[bot]); needs pr-author wired. - skip-labels: comma-separated PR labels (default empty); needs labels wired. check.sh short-circuits to a pass on either match; the release-notes step is gated off via the Detect bypass step, which evaluates both. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
53f887c to
ecc5fe3
Compare
tmikula-dev
left a comment
There was a problem hiding this comment.
Interesting to see tool written in the shell. Python would make control flow of this whole tool IMO "cleaner" and easier to test than bash. That is why the changes looked "weird" in the first place. However, understand bash's advantage that it runs natively on every GitHub Actions runner with zero setup.
Please see my comments.
|
|
||
| # Bypass all checks for bot authors so Dependabot PRs are not blocked | ||
| skip-actors: "dependabot[bot]" | ||
|
|
There was a problem hiding this comment.
I do recommend to add skip-labels as well to the absa_aligned.yml.
There was a problem hiding this comment.
Done in 984487b. Added skip-labels: "skip-checks" to examples/absa_aligned.yml, plus the labels: wiring (join(github.event.pull_request.labels.*.name, ",")) it needs to actually see the PR labels.
| "INPUT_TITLE_TYPES=" "INPUT_TITLE_SCOPES=" "INPUT_DESCRIPTION_MIN_LENGTH=" \ | ||
| "INPUT_BRANCH_PATTERN=" "INPUT_ALLOWED_TARGET_BRANCHES=" | ||
|
|
||
| # ── Actor bypass (#32) ─────────────────────────────────────────────────────── |
There was a problem hiding this comment.
Please remove the issue number from the code.
There was a problem hiding this comment.
Done in 984487b. Removed the issue number from that section header, and from the other two in the diff ("How to fix" guidance (#29) and branch-ticket-pattern override (#27)) for consistency.
| skip-actors: | ||
| description: "Comma-separated PR-author logins that bypass all checks (e.g. bots). Empty = no bypass." | ||
| required: false | ||
| default: "dependabot[bot]" | ||
| skip-labels: | ||
| description: "Comma-separated PR labels that bypass all checks. Empty = no bypass." | ||
| required: false | ||
| default: "" |
There was a problem hiding this comment.
I found a little odd, that we have dependabot[bot] as default here, but for skip-labels we have empty string - still recommending to use skip-checks in the example.
My recommendation is probably leave both empty and let user to configure it for himself.
There was a problem hiding this comment.
Agreed — inconsistent as it was. Done in 984487b: skip-actors now defaults to "" as well, so both bypasses are opt-in and the action never silently skips checks for an author the consumer did not configure. dependabot[bot] stays as the example value in both example workflows and in the README table.
- Default `skip-actors` to empty so both bypass inputs are opt-in and consistent; `dependabot[bot]` is now shown only in the examples/docs. - Wire `labels` and add a `skip-labels` example to examples/absa_aligned.yml. - Drop issue numbers from test section comments. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XhWUoyUSda5v2abkVMdTCg
@
Closes #32.
Problem
Dependabot-opened PRs fail the action under default config:
Bump X from Y to Zhas notype:prefix.Change
Two bypass inputs that skip all checks and report a pass:
pr-author+skip-actors— comma-separated author logins, defaultdependabot[bot].labels+skip-labels— comma-separated PR labels, default empty (opt-in), e.g.skip-checks.check.shshort-circuits to a pass on either match (writes a "skipped" summary + outputs, exits 0). The release-notes step is gated off via aDetect bypasscomposite step that evaluates both actor and label rules.Tests
Orchestrator cases for both dimensions: match bypasses a failing PR, non-match still fails, empty value disables the bypass, CSV whitespace tolerated. Full suite passes (22/22 orchestrator).
Docs
README input tables + example workflows updated (
check_pr_requirements.ymlwireslabelsviajoin(...labels.*.name, ",");absa_aligned.ymlgets the actor bypass).🤖 Generated with Claude Code
@