Keep PR is not possible to merge until success#315
Conversation
It observes other workflows' status and prevents unwilling merges.
WalkthroughA new GitHub Actions workflow named "Merge Gatekeeper" was introduced. It runs on pull request events, uses the Changes
✨ Finishing Touches🧪 Generate Unit Tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a GitHub Actions workflow to block pull-request merges until all required checks succeed.
- Adds a new
merge-gatekeeperworkflow under.github/workflows/ - Configures minimal permissions and triggers on pull requests
- Invokes the
upsidr/merge-gatekeeperaction with a bypass list
Comments suppressed due to low confidence (2)
.github/workflows/merge-gatekeeper.yml:4
- [nitpick] Specify
types:(e.g.,opened,synchronize,reopened) underpull_requestto limit workflow runs to relevant events and reduce noise.
pull_request:
.github/workflows/merge-gatekeeper.yml:18
- [nitpick] Consider using a semantic version tag (e.g.,
@v1.2.1) instead of a full commit SHA for clearer version management and easier updates.
uses: upsidr/merge-gatekeeper@09af7a82c1666d0e64d2bd8c01797a0bcfd3bb5d # v1.2.1
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
.github/workflows/merge-gatekeeper.yml (2)
3-5: Scope pull request events explicitly.
Consider specifying the pull_request activity types (e.g.,types: [opened, reopened, synchronize]) to avoid unnecessary runs on less relevant events.
17-19: Pin action to a specific commit SHA.
Using a fixed SHA ensures stability. Verify periodically that this SHA still corresponds to the intendedv1.2.1release or update as needed.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/merge-gatekeeper.yml(1 hunks)
🔇 Additional comments (5)
.github/workflows/merge-gatekeeper.yml (5)
1-2: Clear workflow name.
The name accurately reflects the purpose of this workflow.
6-7: Enforced least-privilege permissions.
Setting top-levelpermissions: {}overrides defaults, granting only the job-specific scopes below.
10-12: Job-level permissions are appropriate.
Granting onlychecks: readandstatuses: readaligns with the action’s need to inspect workflow statuses without elevated rights.
13-14: Runner and timeout configuration looks good.
Ubuntu-Latestand a 10-minute timeout is reasonable for this check.
20-21: Confirm the ignored parameter value.
Ensureignored: CodeRabbitmatches the exact user/organization login to be skipped (including correct casing).
close #
✏️ Description
It observes other workflows' status and prevents unwilling merges.