Skip to content

Auto-merge green Dependabot updates and group the pm toolchain into one daily PR - #17

Merged
unbraind merged 3 commits into
mainfrom
ci/auto-merge-green-dependabot-updates
Oct 4, 2026
Merged

unbraind merged 3 commits into
mainfrom
ci/auto-merge-green-dependabot-updates

Conversation

@unbraind

@unbraind unbraind commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

What

  • .github/dependabot.yml: npm is checked daily; @unbrained/pm-cli and pm-* packages arrive as one pm-toolchain PR, other minor/patch updates as one dependencies PR. Other ecosystems are unchanged.
  • .github/workflows/dependabot-auto-merge.yml: for Dependabot PRs only (and only in unbraind), dependabot/fetch-metadata (SHA-pinned v3.1.0) classifies the update; the pm-toolchain group (calendar-versioned, so a year rollover reads as semver-major) and every other non-major update get gh pr merge --auto --squash. Workflow default permissions are {}; the job alone gets contents: write + pull-requests: write.
  • Repository setting: auto-merge allowed, merged branches deleted.

Why

Fleet rule ([companion pm-cli-website-6d05]): a pm CLI release must reach every package without a hand-written certification PR. Branch protection still requires test (22), test (26), so nothing merges red; a bump that fails CI stays open as a real defect. Major updates still need a person. Same change as the reviewed pilot unbraind/pm-presets#118.

pm item


Summary by cubic

Automates merging green Dependabot version bumps so pm CLI releases reach every package without a hand-written certification PR.

  • .github/dependabot.yml checks npm daily, grouping @unbrained/pm-cli and pm-* packages into one pm-toolchain PR and other minor/patch updates into one dependencies PR.
  • .github/workflows/dependabot-auto-merge.yml enables squash auto-merge for the calendar-versioned pm-toolchain group (year rollovers read as semver-major) and for updates fetch-metadata classifies as minor or patch; anything unclassified or major waits for a person.
  • The workflow only runs for Dependabot PRs in the unbraind org, uses least-privilege permissions, and documents why it needs write scopes.
  • Branch protection still requires the test checks, so a failing bump stays open as a defect.
  • Records the work as pm-ado-14nn and adds a changelog entry.

Same change as the reviewed pilot unbraind/pm-presets#118.

Written for commit 63573c0. Summary will update on new commits.

Review in cubic

Summary by Sourcery

Automate the safe propagation of Dependabot dependency updates while retaining manual review for major updates outside the pm toolchain.

New Features:

  • Configure daily npm Dependabot updates, grouping the pm toolchain separately from other minor and patch dependencies.
  • Automatically enable squash auto-merge for green non-major Dependabot updates, including calendar-versioned pm-toolchain releases.

Enhancements:

  • Restrict the auto-merge workflow to Dependabot pull requests in the unbraind organization and grant it least-privilege permissions while preserving required status checks.

Chores:

  • Record the change in the project changelog and PM task history.

…ne daily PR

Version bumps of @unbrained/pm-cli, pm-ops and pm-changelog are mechanical.
Dependabot now checks npm daily and groups the pm toolchain (and other
minor/patch updates) into single pull requests; a least-privilege workflow
enables squash auto-merge for every non-major Dependabot PR, so it lands as
soon as the required checks pass and a failing bump stays open as a defect.

pm item: pm-ado-14nn

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @unbraind, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 15 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 40 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 5acf5d31-c16d-4775-ab6c-5a1cb3ac7af6
📥 Commits

Reviewing files that changed from the base of the PR and between fc8289f and 63573c0.

📒 Files selected for processing (5)
  • .agents/pm/history/pm-ado-14nn.jsonl
  • .agents/pm/tasks/pm-ado-14nn.toon
  • .github/dependabot.yml
  • .github/workflows/dependabot-auto-merge.yml
  • CHANGELOG.md

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 59450e1c-7d4b-445f-aa39-438caad7102b
📥 Commits

Reviewing files that changed from the base of the PR and between fc8289f and 8b4ecb8.

📒 Files selected for processing (5)
  • .agents/pm/history/pm-ado-14nn.jsonl
  • .agents/pm/tasks/pm-ado-14nn.toon
  • .github/dependabot.yml
  • .github/workflows/dependabot-auto-merge.yml
  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


Summary by CodeRabbit

  • New Features
    • Dependency updates are grouped into daily toolchain and dependency pull requests, with weekly checks for GitHub Actions.
    • Eligible non-major dependency updates can be automatically merged after required checks pass. Major updates are not auto-merged.

Walkthrough

Dependabot now checks npm dependencies daily and GitHub Actions weekly, with configured update groups. A pull-request workflow enables squash auto-merge for pm-toolchain updates and updates that are not semver-major.

Changes

Dependabot automation

Layer / File(s) Summary
Configure update schedules and groups
.github/dependabot.yml
Adds daily npm and weekly GitHub Actions checks, each with a five-pull-request limit. Defines the pm-toolchain, dependencies, and codeql-action groups.
Enable qualifying auto-merges
.github/workflows/dependabot-auto-merge.yml, .agents/pm/tasks/pm-ado-14nn.toon, .agents/pm/history/pm-ado-14nn.jsonl, CHANGELOG.md
Adds a workflow that fetches update metadata and enables squash auto-merge for pm-toolchain updates or updates not classified as semver-major. Adds task records and a changelog entry describing the automation.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Dependabot
  participant GitHubActions
  participant GitHubCLI
  participant GitHubPullRequest
  Dependabot->>GitHubPullRequest: Create dependency update pull request
  GitHubPullRequest->>GitHubActions: Trigger pull request workflow
  GitHubActions->>GitHubActions: Fetch update metadata and check update type
  GitHubActions->>GitHubCLI: Request squash auto-merge for qualifying updates
  GitHubCLI->>GitHubPullRequest: Enable squash auto-merge
Loading

Merge Risk: ⚪ Minimal · up to 8b4ec

No actionable merge-blocking issue remains; the dependency-update automation is ready for normal merge checks.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 8b4ec

The automation is restricted to Dependabot pull requests in the intended organization, uses a pinned action, and requests GitHub auto-merge rather than forcing a merge. No security bypass is demonstrated. However, update-classification behavior and effective repository merge protections remain insufficiently verified to conclude minimal risk.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The immediate authority boundary is the repository executing the workflow: qualifying dependency PRs can become eligible for automatic merging into their target branch. Accepted updates can affect npm dependencies or GitHub Actions dependencies. Additional fleet, production, or downstream-consumer exposure is not established by this slice.

Security Findings and Attack Paths

  • inferred — For a non-pm-toolchain PR, empty or unrecognized update-type output would satisfy the negative major-version gate. A reachable major update producing such output has not been demonstrated. Prior inspections report recognized-major classification and major-first aggregation in the pinned action, so the candidate remains a proof gap rather than a verified attack path.

Trust Boundaries and Controls

  • observed — The workflow checks PR-author identity and repository ownership before using metadata to authorize a merge request. It does not locally bind that decision to a head SHA, head repository, or base branch. This identifies reliance on GitHub provenance and merge controls, not proof that another actor can bypass them.

Resilience and Maintainability Implications

  • inferred — Repetition, concurrent runs, head changes, interruption after a merge request, and terminal merge or close states rely on external auto-merge semantics. The workflow defines no serialization or explicit cleanup. Without those external guarantees, atomicity, idempotency, revalidation, and rollback completeness remain unresolved; no unsafe terminal state was demonstrated.

Hardening Proposals

  • proposed — An explicit allowlist of recognized minor and patch classifications, preserving the intentional pm-toolchain exception, would make unknown metadata fail closed without depending on classifier completeness.
  • proposed — Document and verify effective token permissions, target-branch protections, head-change behavior, and how to disable outstanding auto-merge requests during rollback. These checks would resolve the remaining authority and lifecycle uncertainties.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: enabling auto-merge for eligible Dependabot updates and grouping the PM toolchain into a daily pull request.
Description check ✅ Passed The description explains the Dependabot grouping and auto-merge changes, their CI and permission constraints, and the project objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Oct 4, 2026

Copy link
Copy Markdown

Reviewer's Guide

This PR configures daily Dependabot npm grouping so the pm toolchain advances as one release-oriented PR, adds a narrowly scoped, SHA-pinned workflow that enables squash auto-merge after required checks for the toolchain and other non-major updates, and records the associated pm work item. Repository settings also enable auto-merge and deletion of merged branches.

Sequence diagram for grouped Dependabot auto-merge

sequenceDiagram
    participant Dependabot
    participant GitHub
    participant Workflow
    participant Metadata
    participant Checks

    Dependabot->>GitHub: Open daily grouped pull request
    GitHub->>Workflow: pull_request
    Workflow->>Metadata: dependabot/fetch-metadata
    Metadata-->>Workflow: dependency-group and update-type

    alt pm-toolchain or non-major update
        Workflow->>GitHub: gh pr merge --auto --squash
        GitHub->>Checks: Run required checks
        Checks-->>GitHub: test (22) and test (26) pass
        GitHub-->>GitHub: Merge pull request automatically
    else Other major update
        Workflow-->>GitHub: Leave pull request open for manual review
    end
Loading

File-Level Changes

Change Details Files
Configure Dependabot to produce daily, grouped npm update pull requests while preserving weekly GitHub Actions updates.
  • Group the pm CLI/toolchain packages into a single unrestricted update group.
  • Group non-toolchain minor and patch npm updates separately, excluding pm packages.
  • Retain the existing weekly GitHub Actions cadence and CodeQL grouping.
.github/dependabot.yml
Add a least-privilege workflow that enables squash auto-merge for eligible Dependabot pull requests.
  • Restrict execution to Dependabot pull requests in the unbraind organization.
  • Use SHA-pinned Dependabot metadata to identify the dependency group and update type.
  • Auto-merge the pm-toolchain group and all non-major updates, leaving other major updates for manual review.
  • Grant write permissions only at the job level and rely on branch protection checks before merging.
.github/workflows/dependabot-auto-merge.yml
Record the associated pm work item and history.
  • Add the pm-ado-14nn task definition and JSONL history entry.
.agents/pm/tasks/pm-ado-14nn.toon
.agents/pm/history/pm-ado-14nn.jsonl

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@unbraind

unbraind commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review
@greptileai review

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
✅ Action performed

Full review finished.

…sions

Review feedback: an update that fetch-metadata cannot classify must not
auto-merge, so the condition now requires semver-minor or semver-patch
outside the calendar-versioned pm-toolchain group. The job's write scopes
are documented, the dependencies group selects every package explicitly,
and the item's acceptance criteria name the pm-toolchain exception.

pm item: pm-ado-14nn
@unbraind

unbraind commented Oct 4, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai full review
@greptileai review

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.


Your included review limit is currently reached under our Fair Usage Limits Policy. This review may still proceed through usage-based billing if eligible. Your next included review will be available in 40 minutes.

@unbraind
unbraind merged commit 0a22419 into main Oct 4, 2026
9 checks passed
@unbraind
unbraind deleted the ci/auto-merge-green-dependabot-updates branch October 4, 2026 17:59
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.

1 participant