Skip to content

Commit 3fbc391

Browse files
committed
Improve clarity of method name
1 parent 206d763 commit 3fbc391

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plugins/github-enricher/gatsby-node.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -776,20 +776,20 @@ const maybeIssuesUrl = async (issues, issuesUrl) => {
776776

777777
const isValidUrl = await urlExist(issuesUrl)
778778

779-
let isOriginalUrl = isValidUrl && await isNotRedirectToPulls(issuesUrl)
779+
let isOriginalUrl = isValidUrl && (!await isRedirectToPulls(issuesUrl))
780780

781781
return isOriginalUrl ? issuesUrl : undefined
782782
}
783783
}
784784

785-
const isNotRedirectToPulls = async (issuesUrl) => {
785+
const isRedirectToPulls = async (issuesUrl) => {
786786
// Being a valid url may not be enough, we also want to check for redirects to /pulls
787787
const urls = await followRedirect.startFollowing(issuesUrl)
788788
console.log("URL chain for", issuesUrl, "is", urls)
789789
const finalUrl = urls[urls.length - 1]
790-
console.log("Final URL is", finalUrl, "which means", !(finalUrl.url.includes("/pulls")))
790+
console.log("Final URL is", finalUrl, "which means", (finalUrl.url.includes("/pulls")))
791791

792-
return !(finalUrl.url.includes("/pulls"))
792+
return (finalUrl.url.includes("/pulls"))
793793
}
794794

795795
// This combines the sponsor opt-in information (which we only fully have after processing all nodes) with the companies and sponsor information for individual nodes,

0 commit comments

Comments
 (0)