Skip to content

Commit

Permalink
fix: improve how we detect that the PR is managed by Mergify (#37)
Browse files Browse the repository at this point in the history
The previous fix doesn't work on the old GitHub UI because the check-runs aren't built the same way. This PR adds a new way to find Mergify's icon on the page.

Fixes MRGFY-4595
  • Loading branch information
DouglasBlackwood authored Jan 21, 2025
1 parent f82718d commit 2fe3c1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mergify.js
Original file line number Diff line number Diff line change
@@ -247,7 +247,7 @@ function tryInject() {
}

const appIconUrl = "https://avatars.githubusercontent.com/in/10562"
var isMergifyEnabledOnTheRepo = document.querySelector(`img[src^="${appIconUrl}?"][alt="Summary"], img[src^="${appIconUrl}?"][alt="Mergify Merge Protections"]`)
var isMergifyEnabledOnTheRepo = document.querySelector(`img[src^="${appIconUrl}?"][alt="Summary"], img[src^="${appIconUrl}?"][alt="Mergify Merge Protections"], a[href="/apps/mergify"] img[src^="${appIconUrl}?"]`)
if (!isMergifyEnabledOnTheRepo) {
return
}

0 comments on commit 2fe3c1d

Please sign in to comment.