Skip to content

feat(redirect-hotfix-pr): redirect Dependabot security PRs to the hotfix lane - #41

Merged
Shinrai merged 2 commits into
nextfrom
feat/hotfix-redirector-dependabot-aware
May 26, 2026
Merged

Shinrai merged 2 commits into
nextfrom
feat/hotfix-redirector-dependabot-aware

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

  • feat(redirect-hotfix-pr): redirect Dependabot security PRs to the hotfix lane (c4e4c89)

🐛 Bug Fixes

  • Potential fix for pull request finding 'CodeQL / Missing regular expression anchor' (329f7fe)

🔧 Other Changes

No other changes

👥 Contributors

…fix lane

Previously the redirect-hotfix-pr action skipped every bot-authored PR. That
meant Dependabot's security-update PRs — which need to ship quickly via the
hotfix lane, not the next-batch release — sat on `next` until someone manually
retargeted them.

The action now redirects on either of two triggers:

- Head branch matches the hotfix/security pattern (existing behavior).
- Author is `dependabot[bot]` AND the PR body contains a GHSA reference (a
  `GHSA-xxxx-xxxx-xxxx` id or a `github.com/advisories/GHSA-…` URL). These
  body markers are present on Dependabot's security PRs and absent on
  routine version bumps, so the two paths cleanly separate.

Implementation:

- Adds `isDependabotSecurityPR({userLogin, prBody})` pure helper.
- `shouldSkip()` gains `userLogin` + `prBody` parameters and returns a new
  `redirectKind` field ("hotfix" or "dependabot-security") so the caller
  knows why the redirect happened.
- `buildCommentBody(oldBase, newBase, kind)` emits a kind-specific
  explanatory comment (mentions the GHSA reference for security redirects).
- `main()` pulls user.login + body from the fetched PR — no new inputs.
- Test suite expanded from ~14 to 30 cases covering the new helper, all
  shouldSkip branches with the new signature, and both comment kinds.

Docs updated in WORKFLOW-SETUP-GUIDE, AGENT-SCAFFOLDING, examples/README,
top-level README, and the example consumer hotfix-redirector.yml header.
@cldmv-bot cldmv-bot Bot added area: core type: documentation Relates to docs, README updates, guides, or inline code comments labels May 26, 2026
…ession anchor'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Shinrai
Shinrai merged commit 5fb9ffb into next May 26, 2026
6 checks passed
@cldmv-bot
cldmv-bot Bot deleted the feat/hotfix-redirector-dependabot-aware branch May 26, 2026 19:39
if (userLogin !== "dependabot[bot]") return false;
if (!prBody) return false;
const ghsaId = /\bGHSA-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}\b/;
const advisoryUrl = /\bhttps?:\/\/github\.com\/advisories\/GHSA-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}-[A-Za-z0-9]{4}\b/i;
Shinrai added a commit that referenced this pull request May 26, 2026
…#40)

## 🚀 What's Changed

### 💥 Breaking Changes
_No breaking changes_

### ✨ Features

- #41 (5fb9ffb)
- feat(redirect-hotfix-pr): redirect Dependabot security PRs to the
hotfix lane (c4e4c89)

### 🐛 Bug Fixes

- #48 (7d06c21)
- fix(changelog): drop merge commits from release-PR changelog (7ccdfde)

- #47 (ff4207b)
- fix(v4): prefer "Create a merge commit" on next/hotfixes; dedupe
stacked-PR commits (c552494)

- #44
- fix(v4): per-branch merge methods + PR-ref annotation in release-PR
changelogs (29637d7)
- fix(rulesets): move Copilot review next/hotfixes; allow squash as
fallback (26dcea8)
- fix(changelog): drop redundant precondition check in
findAssociatedPullNumber (ea01889)

- #41 (5fb9ffb)
- Potential fix for pull request finding 'CodeQL / Missing regular
expression anchor' (329f7fe)

- #39 (91ddf1f)
- fix(cla): audit tool walks both default and override signature trees
(84ecbed)
- fix(cla): pass public_cla_url_template through reusable workflow;
document override behavior (97bb8d2)
- fix(cla): bot reads CLA from ledger (default) or consumer override;
per-text-hash scope (132bcb7)
- fix(cla): remove root CLA.md; bot must use the central ledger as
source (f01b007)

### 🔧 Other Changes

- #46 (454b724)
- docs(readme): modernize for v4; drop stale v3-launch markers; fix
ruleset-generator links (d09fdb8)

- #43 (417f110)
- docs(embedded-tests): surface the embedded-tests-ci feature in
onboarding (27a82f6)

- #42 (47a9ee4)
- chore(dependabot): add v4-tuned dependabot.yml template + update
auto-merge wiring (d52b60e)

- #39 (91ddf1f)
- docs(cla): describe override scope across all onboarding + reference
docs (7a25d06)

- #38 (9527fef)
- docs(cla): reframe public sample CLA, drop mirror-of-private framing
(549263a)
  - chore(cla): seed real CLA text + add boilerplate files (730a90e)


<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

---------

Co-authored-by: Nate Corcoran <[email protected]>
Co-authored-by: cldmv-bot[bot] <230771808+cldmv-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants