fix: detect pullClosed and pullMerged data-status attributes#180
Conversation
Add early-return detection for closed and merged PRs via GitHub's data-status attributes, alongside existing pullOpened/draft detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Change-Id: Iaed45b20326e1229db03eaa78d9626283d6825eb
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🟢 Required ReviewsWonderful, this rule succeeded.
🟢 Enforce conventional commitWonderful, this rule succeeded.Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 🔎 ReviewsWonderful, this rule succeeded.
🟢 📕 PR descriptionWonderful, this rule succeeded.
|
There was a problem hiding this comment.
Pull request overview
This PR enhances the isPullRequestOpen() function to detect closed and merged pull requests using GitHub's modern data-status attributes (pullClosed and pullMerged), complementing the existing detection for open and draft PRs.
Changes:
- Added detection for
pullClosedandpullMergeddata-status attributes - Added comprehensive test coverage for all data-status attribute scenarios
- Updated existing test descriptions to clarify they test legacy fixture-based detection
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/mergify.js | Added closed and merged querySelector checks with early return for closed/merged PRs |
| src/tests/mergify.test.js | Added 8 new test cases covering all data-status attributes, priority handling, and edge cases |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🧪 CI InsightsHere's what we observed from your CI run for 452ad26. 🟢 All jobs passed!But CI Insights is watching 👀 |
Merge Queue Status✅ The pull request has been merged at 452ad26 This pull request spent 2 minutes 2 seconds in the queue, including 1 minute 46 seconds running CI. Required conditions to merge
|
Add early-return detection for closed and merged PRs via GitHub's
data-status attributes, alongside existing pullOpened/draft detection.
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com