This repository was archived by the owner on Aug 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
ci(dependabot): gate automatic merges on CodeRabbit review #133
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8124227
ci(dependabot): gate automatic merges on CodeRabbit review
acgetchell 7567372
fix(ci): serialize Dependabot automation per pull request
acgetchell 7f23d53
fix(ci): deduplicate CodeRabbit review requests by revision
acgetchell 72fc5a1
fix(ci): bind Dependabot auto-merge to reviewed revision
acgetchell 5d571c8
fix(ci): harden Dependabot review rearming on head updates
acgetchell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,3 +7,7 @@ updates: | |
| interval: "weekly" | ||
| cooldown: | ||
| default-days: 7 | ||
| groups: | ||
| github-actions: | ||
| patterns: | ||
| - "*" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| name: Dependabot review and auto-merge | ||
|
|
||
| "on": | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - reopened | ||
| - ready_for_review | ||
| - synchronize | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| permissions: | ||
| contents: write | ||
| issues: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| review-and-enable-auto-merge: | ||
| if: >- | ||
| github.event.pull_request.user.login == 'dependabot[bot]' && | ||
| github.repository == 'acgetchell/CDT-plusplus' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Request CodeRabbit review | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| PR_NUMBER: ${{ github.event.pull_request.number }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| REPOSITORY: ${{ github.repository }} | ||
| run: | | ||
| marker="<!-- coderabbit-review-request:${PR_HEAD_SHA} -->" | ||
| comments="$( | ||
| gh api --paginate \ | ||
| "repos/${REPOSITORY}/issues/${PR_NUMBER}/comments" \ | ||
| --jq '.[] | select(.user.login == "github-actions[bot]") | .body' | ||
| )" | ||
| if grep -Fxq -- "$marker" <<< "$comments"; then | ||
| echo "CodeRabbit review already requested for ${PR_HEAD_SHA}." | ||
| exit 0 | ||
| fi | ||
| body="$(printf '@coderabbitai review\n\n%s' "$marker")" | ||
| gh pr comment "$PR_URL" --body "$body" | ||
|
|
||
| - name: Enable auto-merge | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| PR_URL: ${{ github.event.pull_request.html_url }} | ||
| run: gh pr merge --auto --squash --match-head-commit "$PR_HEAD_SHA" "$PR_URL" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.