Skip to content

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

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

unbraind merged 4 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), windows-acceptance-launcher (22), windows-acceptance-launcher (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 Sourcery

Automate the delivery of approved Dependabot updates while grouping pm toolchain releases into a daily update.

New Features:

  • Enable daily npm dependency checks with grouped pull requests for the pm toolchain and other minor or patch updates.
  • Automatically enable squash auto-merge for green, non-major Dependabot updates while allowing calendar-versioned pm toolchain releases to merge unattended.

Enhancements:

  • Restrict the auto-merge workflow with least-privilege permissions and repository-specific Dependabot filtering.

CI:

  • Add a Dependabot auto-merge workflow gated by required status checks.

Chores:

  • Record the pm-vcs task and update the changelog and self-hosting bundle.

Summary by cubic

Auto-merges green Dependabot updates so pm toolchain version bumps land without a hand-written certification PR, mirroring the reviewed pilot unbraind/pm-presets#118.

  • Dependabot now checks npm daily; @unbrained/pm-cli and pm-* packages group into one pm-toolchain PR, and other minor/patch updates into a dependencies PR.
  • A new least-privilege workflow enables squash auto-merge only for updates fetch-metadata classifies as minor or patch, or for the pm-toolchain group; a failing or unclassified update stays open for a person.
  • The pm-toolchain group has no update-type filter because pm uses calendar versions, so a year rollover (2026.x → 2027.x) reads as semver-major and still merges unattended.

Written for commit 6927842. Summary will update on new commits.

Review in cubic

…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-vcs-0bur

@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

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 9efd2a39-0681-47fb-bb95-88256132a862
  • 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 to run daily and consolidate updates into a pm-toolchain group plus a minor/patch dependencies group, then adds a SHA-pinned, least-privilege workflow that enables squash auto-merge for eligible green Dependabot PRs. Calendar-versioned pm-toolchain updates are explicitly allowed through year-rollover major versions, while other major updates remain manual; repository auto-merge and branch cleanup settings are also enabled.

Sequence diagram for Dependabot auto-merge workflow

sequenceDiagram
    participant Dependabot
    participant GitHubActions
    participant Metadata as dependabot/fetch-metadata
    participant GitHub as GitHub PR
    participant Checks as Required checks

    Dependabot->>GitHub: Open grouped npm pull request
    GitHub->>GitHubActions: Trigger pull_request
    GitHubActions->>Metadata: Fetch update metadata
    Metadata-->>GitHubActions: dependency-group and update-type
    alt pm-toolchain group
        GitHubActions->>GitHub: gh pr merge --auto --squash
    else non-major update
        GitHubActions->>GitHub: gh pr merge --auto --squash
    else other major update
        GitHubActions-->>GitHub: Leave PR for manual review
    end
    Checks-->>GitHub: Required checks pass
    GitHub->>GitHub: Merge automatically and delete branch
Loading

Flow diagram for grouped daily Dependabot updates

flowchart TD
    A[Daily npm Dependabot check] --> B{Package matches pm-toolchain?}
    B -->|@unbrained/pm-cli or pm-*| C[pm-toolchain PR]
    B -->|Other package| D{Minor or patch update?}
    D -->|Yes| E[dependencies PR]
    D -->|No| F[Major update remains manual]
    C --> G[Auto-merge after required checks pass]
    E --> G
    G --> H[Squash merge and delete branch]
Loading

File-Level Changes

Change Details Files
Configure daily npm Dependabot updates with separate pm toolchain and general dependency groups.
  • Schedule npm checks daily.
  • Group @unbrained/pm-cli and pm-* packages into pm-toolchain.
  • Group non-pm minor and patch updates into dependencies while excluding pm packages.
  • Leave other package ecosystems unchanged.
.github/dependabot.yml
Add a least-privilege workflow that enables squash auto-merge for eligible Dependabot pull requests.
  • Restrict execution to Dependabot PRs in the unbraind organization.
  • Use SHA-pinned dependabot/fetch-metadata to identify update groups and semantic version impact.
  • Auto-merge pm-toolchain updates and all non-major updates after required checks pass.
  • Skip unrelated major updates for manual review.
  • Set workflow-wide permissions to none and grant write permissions only to the job.
.github/workflows/dependabot-auto-merge.yml
Enable repository-level merge automation behavior.
  • Allow pull request auto-merge.
  • Delete branches after merge.
Repository settings
Record the associated pm task and history artifacts.
  • Add the pm-vcs-0bur task definition.
  • Add its history record.
.agents/pm/tasks/pm-vcs-0bur.toon
.agents/pm/history/pm-vcs-0bur.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

Rate Limit Exceeded

@unbraind have exceeded the limit for the number of chat messages per hour. Please wait 14 minutes and 24 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-vcs-0bur
@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 54 minutes and 9 seconds before sending another message.

@unbraind
unbraind merged commit 727b6b4 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