Skip to content

fix: detect pullClosed and pullMerged data-status attributes#180

Merged
mergify[bot] merged 1 commit intomainfrom
devs/sileht/dependabot-fix/Iaed45b20326e1229db03eaa78d9626283d6825eb
Feb 6, 2026
Merged

fix: detect pullClosed and pullMerged data-status attributes#180
mergify[bot] merged 1 commit intomainfrom
devs/sileht/dependabot-fix/Iaed45b20326e1229db03eaa78d9626283d6825eb

Conversation

@sileht
Copy link
Member

@sileht sileht commented Feb 5, 2026

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

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
Copilot AI review requested due to automatic review settings February 5, 2026 18:46
@mergify mergify bot deployed to Mergify Merge Protections February 5, 2026 18:46 Active
@mergify
Copy link
Contributor

mergify bot commented Feb 5, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 Required Reviews

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 pullClosed and pullMerged data-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.

@mergify mergify bot requested a review from a team February 5, 2026 18:48
@mergify
Copy link
Contributor

mergify bot commented Feb 5, 2026

🧪 CI Insights

Here's what we observed from your CI run for 452ad26.

🟢 All jobs passed!

But CI Insights is watching 👀

mergify bot added a commit that referenced this pull request Feb 6, 2026
@mergify
Copy link
Contributor

mergify bot commented Feb 6, 2026

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.
The checks were run on draft #182.

Required conditions to merge

@mergify mergify bot added the queued label Feb 6, 2026
@mergify mergify bot merged commit a01e493 into main Feb 6, 2026
4 checks passed
@mergify mergify bot deleted the devs/sileht/dependabot-fix/Iaed45b20326e1229db03eaa78d9626283d6825eb branch February 6, 2026 09:09
@mergify mergify bot removed the queued label Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants