We want GitHub to automatically close issues if they are referenced from commit messages as documented here.
In most cases this does not work in the https://github.com/eclipse-apoapsis/ort-server repository and it is totally unclear to me why. I could not find any documentation that this feature could be disabled, and I could not find any reports of other GitHub users having this issue.
Yes, maybe it's related to that. According to the docs the trigger should be the merge to the main branch, so the merge queue should not matter, but maybe there is a bug.
I could not find anything related to the problem that GitHub does not close referenced issues from PRs. It would be good if you could run a tests with and without merge queue and see if there is a connection. If we gathered more data points we can certainly open a ticket with GitHub support, though that might be unsatisfactory from experience.
Push directly to main with "Fixes #1 (closed)" in the commit message works.
Merge a PR without merge queue with "Fixes #2 (closed)" in the PR description and commit message works.
Merge a PR without merge queue with two commits with "Fixes #3 (closed)" and "Fixes #4 (closed)" in the commit messages but not in the PR description works.
Merge a PR via merge queue with "Fixes #5 (closed)" in the PR description and commit message works.
Merge a PR via merge queue with two commits with "Fixes #6" and "Fixes #7 (closed)" in the commit message but not in the PR description does NOT work.
The reason why 4 works is that if the issue reference is in the PR description GitHub links the PR to the issue. However, this link is not generated when the issue references are only in the commit messages. With out merge queue this still works as documented as shown in scenario 3.
So this is clearly a bug in GitHub that can easily be reproduced, now that we know how.
that is quite some extensive test, ty. I assume you did the merge queue test with merge_method: rebase? The method itself will probably make no difference.
So is this something that you can build upon, i.e. make sure that the PR description references the issues that should be closed? Maybe a workflow could be added to check if the description includes an issue link and issue a warning if this is not the case?
Reporting that to GH is an option, but it might take a while for them the react on it if ever.
I assume you did the merge queue test with merge_method: rebase?
Correct.
Reporting that to GH is an option, but it might take a while for them the react on it if ever.
I will discuss a workaround with the team, but it would be great if you could report the issue to GitHub anyway. I could do it as well, but I guess EF is an enterprise customer, so you should get more attention than if I would report it as an individual user?
In the end I did create it for the eclipse-apoapsis project and it says standard support for that org. Every member of an org can create a support ticket for a specific org afaict. Lets see what they answer.
Now I want to make sure this isn't just a mistake where the commit message . after the number is
obfuscating the linkage.
Can you please attempt to reproduce this with a commit message only in the merge queue where a .
does not immediately following the issue number that is attempting to be linked?
If you can please provide the PR and issue after that I will be happy to escalate this to my
engineering team for further review!
so he misses the point that the commit message seems to be ignored in case of a merge queue. There are 2 examples, one where it works, one where not, and the commit message follows the same pattern.
The case where it actually works, the fixes message is in the PR description, while for the one where it does not work it is not.
My engineers are taking a look into this here at this time, but they have advised in the meantime as a workaround to utilize the description comments in order to close these linked issues.
Once I have more details I will be sure to let you know.
Regards,
Vincent
GitHub Enterprise Support
I answered that you already have a pretty neat workaround in place to ensure that closing references between commits and PR are in sync.
Our engineering team has indicated that this work will not be completed in the near-term.
With that in mind I'm going to update the status of this support request as Solved. However, please note that the status of Closed or Solved is simply a state within our support system, and does not necessarily reflect the state of the internal issue with our engineering team.
Please keep an eye on the GitHub changelog and our social media feeds for the latest announcements about new features and fixes. You can also browse the GitHub public roadmap which is a project board that provides a high level overview of the current developments and their planned release schedule.
I understand that this is not an ideal response. However, I can assure you the issue is still being tracked in our system. If you have any additional instances of this that may help us raise the visibility and priority, please open a new ticket and we can add it to the issue while we continue to look at it. In the meantime, we will be closing out this ticket and we will send a follow up if we have any additional information in the future.