-
Notifications
You must be signed in to change notification settings - Fork 0
chore(ci): dependabot monthly + auto-merge patch/minor (stop version-bump babysitting) #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
c4ccc22
6d046ad
6271896
2980123
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,50 @@ | ||||||||||||||||
| name: Dependabot auto-merge | ||||||||||||||||
|
|
||||||||||||||||
| # Auto-merges routine dependency bumps so version churn stops landing in a human's lap. | ||||||||||||||||
| # Patch + minor updates: approved and set to auto-merge (GitHub merges them once every | ||||||||||||||||
| # required check is green — the same CI gate a human would wait for). MAJOR updates are | ||||||||||||||||
| # left alone: a major can carry breaking API changes (FluentValidation 11→12 was one this | ||||||||||||||||
| # repo saw), so those still want a person to read the release notes. | ||||||||||||||||
| # | ||||||||||||||||
| # Scope: dependabot-authored PRs only. Nothing here can merge human PRs. | ||||||||||||||||
| # | ||||||||||||||||
| # NOTE on the review requirement: if the branch ruleset requires an approving review, | ||||||||||||||||
| # the `gh pr review --approve` step below (run as the github-actions bot) satisfies it — | ||||||||||||||||
| # BUT only if the org/repo setting "Allow GitHub Actions to create and approve pull | ||||||||||||||||
| # requests" is enabled (Settings → Actions → General). If that's off, the approve step | ||||||||||||||||
| # fails and auto-merge waits forever; either enable that setting or add `dependabot[bot]` | ||||||||||||||||
| # to the ruleset's bypass list. | ||||||||||||||||
|
|
||||||||||||||||
| on: pull_request | ||||||||||||||||
|
|
||||||||||||||||
|
Comment on lines
+18
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win Add a missing Adding a concurrency group prevents multiple instances of this workflow from running simultaneously on the same PR, saving CI resources and preventing race conditions during auto-merge. As per path instructions, DO flag missing 🚦 Proposed fix on: pull_request
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true📝 Committable suggestion
Suggested change
🧰 Tools🪛 zizmor (1.26.1)[warning] 18-18: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting (concurrency-limits) 🤖 Prompt for AI AgentsSource: Path instructions |
||||||||||||||||
| permissions: | ||||||||||||||||
| contents: write | ||||||||||||||||
| pull-requests: write | ||||||||||||||||
|
|
||||||||||||||||
| jobs: | ||||||||||||||||
| auto-merge: | ||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||
| if: github.actor == 'dependabot[bot]' | ||||||||||||||||
| steps: | ||||||||||||||||
| - name: Fetch dependabot metadata | ||||||||||||||||
| id: meta | ||||||||||||||||
| uses: dependabot/fetch-metadata@v2 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Approve + enable auto-merge for patch/minor | ||||||||||||||||
| if: steps.meta.outputs.update-type == 'version-update:semver-patch' || steps.meta.outputs.update-type == 'version-update:semver-minor' | ||||||||||||||||
| run: | | ||||||||||||||||
| gh pr review --approve "$PR_URL" | ||||||||||||||||
| gh pr merge --auto --squash "$PR_URL" | ||||||||||||||||
|
Comment on lines
+35
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win Include Applying strict bash execution flags ensures that any unhandled errors or unbound variables cause the script to fail immediately, preventing unintended behavior. As per path instructions, DO flag missing
🛠️ Proposed fixesFor lines 35-37: run: |
+ set -euo pipefail
gh pr review --approve "$PR_URL"For lines 44-47: run: |
+ set -euo pipefail
gh pr comment "$PR_URL" --body "🔎 **Major version bump — held for manual review.** \📝 Committable suggestion
Suggested change
📍 Affects 1 file
🤖 Prompt for AI AgentsSource: Path instructions |
||||||||||||||||
| env: | ||||||||||||||||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||||||||||||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Flag majors for manual review | ||||||||||||||||
| if: steps.meta.outputs.update-type == 'version-update:semver-major' | ||||||||||||||||
| run: | | ||||||||||||||||
| gh pr comment "$PR_URL" --body "🔎 **Major version bump — held for manual review.** \ | ||||||||||||||||
| Auto-merge covers patch/minor only; a major can carry breaking changes (read the release \ | ||||||||||||||||
| notes, check the saga/outbox/concurrency paths, then merge)." | ||||||||||||||||
| env: | ||||||||||||||||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||||||||||||||||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.