-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Pull request does not mention any issues" #100
Comments
I think I found the reason. The problem was that the corresponding issue was not linked to its pull request. The problem is that the error message in fact tells exactly the opposite. It says: "Pull request does not mention any issues". But its the other way round. It should say e.g.: "Issue is not linked to any pull request". |
Thanks for filing an issue! Weird, it shouldn't matter if the issue is not linked to the pull request as long as the pull request links it. It also doesn't matter if the branch is the main branch or not. If the repository is public, would you mind sharing the pull request link? I might need to check the API response for that PR. |
Thanks again for your quick reply Cristopher. Yes indeed its strange. I tried it two times (linked and unlinked the PR in the issue) and in both cases when the PR was unlinked, it gave me the mentioned error message. Unfortunately the repo is one of our company repos so I'm not allowed to share the content. But if you can tell what debug output you need and how I can enable it, I'll get it when having the next PR that shows the issue. |
Aah ok, since it's not public. I'll try to reproduce it here instead. |
It's reproducible via #112. My preliminary guess is that since 1 issue can only be mentioned 1 PR, the second one is ignored. This is more like a GitHub bug to be honest (or it just works like that). I'll investigate further. |
Found the issue. Apparently, magic keyword is ignored when the target isn't the default branch. If the target isn't the default branch, you must link it manually. Personally, this feels like a ridiculous limitation by GitHub. I'll handle this by bringing up the old issue-linking logic back. |
Great that you found it so fast Cristopher! Yes I already expected that I need to link a PR manually when I want to connect it to the corresponding issue and when not using the default branch. I was just surprised that obviously it is required to have the PR linked in the issue in order to for conventional-pr to run correctly. I thought linking the PR is just a nice-to-have GitHub feature for not having to search for PRs that belong to an issue. |
Unbelievable! You're sooo fast! Thank you very much!! I just confirmed the issue again. So the PR must be linked to the issue, otherwise I get the mentioned error message. I'll upgrade now to the new version and let you know how the next PR behaves ;-). |
Looks great. Thanks again @Namchee! I'll keep an eye on. |
I'm getting "Pull request does not mention any issue" even though the body of my PR contains the closed issue. It looks like this:
Closes #1234
while 1234 is a valid issue which was selected from GitHubs auto-complete dropdown (when pressing '#').
One thing that might be important is that we are using a different branch than "main" against which we want to merge the PR to. We have main too and main is the default branch. So we are NOT merging against the default branch (in case that might be an issue).
The text was updated successfully, but these errors were encountered: