Learn more about these different git repos.
Other Git URLs
It looks like #3227 was when the feature was added. In Koji, I see a number of automatic links created, but it does not appear consistent.
Here is an issue with a linked PR https://pagure.io/koji/issue/1266
And here is another that lacks the link, even though the there is a PR that fixes it. https://pagure.io/koji/issue/1316 https://pagure.io/koji/pull-request/1317
Is this a formatting issue with the comments, or is Pagure not considering the text of the pull request?
It only works if the pull request states (Fixes|Resolves|Closes) (https://pagure.io/PROJECT/issue/NNNN|#NNNN)
(Fixes|Resolves|Closes) (https://pagure.io/PROJECT/issue/NNNN|#NNNN)
Without that, it can't tie the relationship together.
For example: https://pagure.io/pagure/pull-request/4193
I don't see why it can't handle '#NNNN' format as the pagure plugin does at push time.
Also, it doesn't seem to respond to either form in the comments on the PR itself. Often, PRs include multiple commits and no single one of them is the fix. It is frequently more natural to put text like that in the PR entry rather than a commit comment.
Metadata Update from @pingou: - Issue set to the milestone: 5.5 - Issue tagged with: RFE
Metadata Update from @pingou: - Issue assigned to pingou
@mikem I agree, it should be something that works from the PR description as well.
I have the code to do this.
I need to see: - how to close the ticket on PR merge automatically - tests :)
It will only add links, not remove them. So if you say it fixes #1 and then you realized you had meant to say #10, the link between #1 and the PR won't be removed.
Why not make it dynamically repopulate on update? That is, do add/remove?
That would imply tracking how the link got created (initial comment vs commit messages) which we don't do currently, but ok maybe we could do it :-p
So the places where the text can be are:
How much work would it be for the system to scan (all of) these sources each time and generate the full set of links? Then you wouldn't need to track the "why".
The initial comment is easy, the commits a little more tricky depending on their number (and it adds an IO load since they need to be loaded from disk). Adding an "origin" field is just a new field in the existing relation table so kinda trivial. We can them wipe all the existing relations and re-generate them.
Commit 2479cae fixes this issue
Log in to comment on this ticket.