Skip to content

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

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 Dependabot version bumps for unbraind: npm is now checked daily, pm toolchain packages are grouped into one pm-toolchain PR, and eligible Dependabot PRs get GitHub squash auto-merge that lands as soon as required checks pass.

  • The pm-toolchain group has no update-types filter, so a calendar-version year rollover (2026.x → 2027.x) still auto-merges; other minor/patch updates land in a disjoint dependencies group.
  • Only updates dependabot/fetch-metadata classifies as minor or patch auto-merge outside the pm-toolchain group; a major or unclassified update waits for a person, and a bump that fails CI stays open as a defect under branch protection.
  • The workflow runs only for Dependabot PRs in unbraind, uses SHA-pinned dependabot/fetch-metadata, and grants contents and pull-requests write to the job alone.

Written for commit 02a1942. Summary will update on new commits.

Review in cubic

Summary by Sourcery

Automate safe Dependabot maintenance by grouping daily npm updates and auto-merging eligible changes after required checks pass.

New Features:

  • Group npm toolchain updates into a dedicated daily Dependabot pull request and consolidate other minor and patch updates separately.

Enhancements:

  • Automatically enable squash auto-merge for eligible green Dependabot updates while retaining manual approval for major or unclassified updates.

Chores:

  • Allow repository auto-merge and delete branches after merging Dependabot updates.

…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-starter-enr4

@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.

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: 7f348cd6-2ced-411e-9c90-f676dda63c3b
📥 Commits

Reviewing files that changed from the base of the PR and between b3c8da4 and 02a1942.

📒 Files selected for processing (5)
  • .agents/pm/history/pm-starter-enr4.jsonl
  • .agents/pm/tasks/pm-starter-enr4.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
    • Dependabot now checks npm dependencies daily, grouping toolchain updates into one pull request and other minor or patch updates into another.
    • Eligible toolchain, minor, and patch updates can be squash-merged automatically once required checks pass. Major and unclassified updates are not automatically merged.
  • Documentation
    • Added a changelog entry describing the update grouping and auto-merge behavior.

Walkthrough

Dependabot now checks npm dependencies daily and groups updates into toolchain and general dependency pull requests. A new pull request workflow enables squash auto-merge for toolchain updates and semver minor or patch updates.

Changes

Dependabot update automation

Layer / File(s) Summary
Daily npm update groups
.github/dependabot.yml, .agents/pm/tasks/pm-starter-enr4.toon, .agents/pm/history/pm-starter-enr4.jsonl, CHANGELOG.md
Dependabot checks npm dependencies daily. It groups @unbrained/pm-cli and pm-* packages as pm-toolchain, and places other minor and patch updates in dependencies. The task records and changelog document the automation.
Eligible pull request auto-merge
.github/workflows/dependabot-auto-merge.yml
The workflow fetches Dependabot metadata and enables squash auto-merge for pm-toolchain updates or semver minor and patch updates. The job grants contents: write and pull-requests: write permissions.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Dependabot
  participant GitHubActions
  participant GitHubCLI
  Dependabot->>GitHubActions: Open pull request triggers workflow
  GitHubActions->>GitHubActions: Fetch Dependabot metadata
  GitHubActions->>GitHubCLI: Run squash auto-merge for eligible update
  GitHubCLI->>Dependabot: Enable pull request auto-merge
Loading

Merge Risk: ⚪ Minimal · up to 02a19

The auto-merge command does not need a checkout for the URL it receives. No actionable merge-blocking issue was established; confirm the stated required checks through normal repository settings review.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 02a19

The automation is limited to Dependabot pull requests in the intended organization, uses a pinned action, and does not execute pull-request code. No exploitable weakness was established. However, safe unattended merging depends on repository protection settings and pending auto-merge behavior that were not independently verified.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The directly evidenced authority concerns repository contents and pull-request merging. Eligible updates include unrestricted pm-toolchain version changes and minor or patch Dependabot updates across ecosystems. Downstream deployment, credential, and tenant exposure cannot be determined from the supplied surface.

Trust Boundaries and Controls

  • observed — The authorization gate uses the PR author’s Dependabot identity and the repository owner. Eligibility comes from metadata outputs, while the shell receives the platform-provided PR URL through a quoted environment variable rather than interpolating PR text into executable commands.

Resilience and Maintainability Implications

  • inferred — The PR delegates deferred merging and required-check enforcement to GitHub. Source inspection establishes the request and its current PR identity, but not revalidation, revocation, concurrency, or cleanup semantics after head changes or interruption. No reachable eligibility-bypass scenario was established.

Hardening Proposals

  • proposed — Before relying on unattended merging, verify effective required checks and token bypass permissions, and establish how pending auto-merge requests are cleared if eligibility changes or automation is rolled back.
🚥 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 PR.
Description check ✅ Passed The description explains the Dependabot schedule and grouping, auto-merge conditions, permissions, required checks, and the intended behavior for major or failing updates.
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 changes npm Dependabot checks to daily grouped updates, then uses a narrowly scoped, SHA-pinned workflow to enable squash auto-merge for green PM-toolchain and other non-major Dependabot PRs while leaving major non-PM updates for manual review. Repository settings also permit auto-merge and delete merged branches.

Sequence diagram for Dependabot auto-merge workflow

sequenceDiagram
    participant Dependabot
    participant GitHub
    participant Metadata as dependabot/fetch-metadata
    participant Checks as Required checks
    participant Merge as GitHub auto-merge

    Dependabot->>GitHub: Open pull request
    GitHub->>Metadata: fetch-metadata
    Metadata-->>GitHub: dependency-group and update-type
    alt pm-toolchain group
        GitHub->>Merge: gh pr merge --auto --squash
    else non-major update
        GitHub->>Merge: gh pr merge --auto --squash
    else major non-PM update
        GitHub-->>Dependabot: Leave pull request for manual review
    end
    Merge->>Checks: Wait for required checks
    Checks-->>Merge: Pass
    Merge->>GitHub: Squash merge and delete branch
Loading

File-Level Changes

Change Details Files
Configure Dependabot to run daily and consolidate npm updates into targeted groups.
  • Group the PM CLI and pm-prefixed packages into pm-toolchain without update-type filtering.
  • Group all remaining minor and patch npm updates into dependencies, excluding PM packages.
  • Leave other ecosystem configuration unchanged.
.github/dependabot.yml
Add a least-privilege workflow that enables auto-merge for eligible Dependabot pull requests.
  • Restrict execution to Dependabot PRs in repositories owned by unbraind.
  • Fetch Dependabot metadata using a SHA-pinned action.
  • Auto-merge the PM toolchain group, including calendar-version year rollovers, and all non-major updates via squash merge.
  • Use empty default permissions and grant write access only to the job.
.github/workflows/dependabot-auto-merge.yml
Record the associated PM task and history entries.
  • Add the task definition for pm-starter-enr4.
  • Add its PM history record.
.agents/pm/tasks/pm-starter-enr4.toon
.agents/pm/history/pm-starter-enr4.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

@greptile-apps

greptile-apps Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High risk] Enables automatic merging of dependency updates via CI workflow.

The PR appears safe to merge, with the previous finding fixed and no new actionable issues found.

What we checked:

  • Unknown updates stay open: No. The changed condition requires either pm-toolchain or an exact minor or patch classification.

Summary

Adds daily npm update groups and squash auto-merge for eligible Dependabot PRs.

  • pm-toolchain includes calendar-versioned major updates.
  • Other updates must be classified as minor or patch.
  • The latest changes add an explicit wildcard, tighten the merge condition, and fix the task criteria.
  • The previous finding is fully addressed. No new actionable issues were found.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Dependabot PR] --> B{Owner is unbraind?}
  B -- No --> C[Skip]
  B -- Yes --> D[Read update metadata]
  D --> E{pm-toolchain or minor or patch?}
  E -- No --> F[Wait for a person]
  E -- Yes --> G[Enable squash auto-merge]
  G --> H{Required checks pass?}
  H -- No --> I[PR stays open]
  H -- Yes --> J[GitHub merges PR]
Loading

Reviews (3) · Last reviewed commit: "Allow-list minor and patch updates and d..."

Comment thread .agents/pm/tasks/pm-starter-enr4.toon Resolved
@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

Rate Limit Exceeded

@unbraind have exceeded the limit for the number of chat messages per hour. Please wait 14 minutes and 27 seconds before sending another message.

…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-starter-enr4
@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.

@unbraind
unbraind merged commit 6d36bbb into main Oct 4, 2026
11 checks passed
@unbraind
unbraind deleted the ci/auto-merge-green-dependabot-updates branch October 4, 2026 18:02
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