-
Notifications
You must be signed in to change notification settings - Fork 27
Description
The way this plugin works is that it checks to see if the URL you submitted is a issue first, then pull request, and then returns results based which is populated.
I noticed on my repo that it would mark PRs as issues because if you go to /issues/8, for example, it would redirect you to the PR page /pull/8 and would populate the necessary fields for issue and then return as an issue.
So I changed the order of this in provider.ts to flip this.
if (pr) {
return getPRMentions(owner, repoName, pr)
}
if (issue) {
return getIssueMentions(owner, repoName, issue)
}So that it correctly treats my PRs as PRs since we don't use github issues. I'm sure others would have this issue as well, so maybe you could change the way this part works since you're pulling both issue and PR in the block above it and maybe favor the PR format over the issue format since it's more comprehensive:
const [issue, pr] = await Promise.all([
fetchIssue(githubClient, owner, repoName, number),
fetchPR(githubClient, owner, repoName, number),
])I rebuilt this locally and pointed cody to the new bundle.js file and it works perfect now for me.