In #17 we dealt with relative references and addressed the use of short references (e.g. #41) in commits and issues.
However, it turns out Gitlab has another form of relative reference.
Normally, if you reference an issue from a commit in another project the reference pushed into the issue will look something like group/project@<commit ref>
But, if both projects are in the same group, Gitlab will omit the project name giving you a reference of the form project@<commit ref>.
Currently that'll lead to us building an incomplete URL as we won't include a project name.
Activity
23-Apr-22 10:25
changed the description
23-Apr-22 10:31
There are actually 2 sides to this.
The first is more important as it can break the display of issue pages (because of the incorrect path we'll return a 404 after failing to retrieve the commit)
23-Apr-22 10:39
Commit
ce373d99fixes display of enhanced commit notifications, although we still need to fix the second item so that links out to the commit are valid.Although I've not seen an example, I guess we're going to need to implement similar support for issue mentions (we'll probably be able to see an example once we can access the commit itself)
23-Apr-22 10:50
mentioned in commit 1413e66b9b7c886ad3f9a478859324db4c16c167
Commit: 1413e66b9b7c886ad3f9a478859324db4c16c167 Author: B Tasker Date: 2022-04-23T11:50:05.000+01:00Message
Handle building commit urls from relative references for websites/Gitlab-Issue-Listing-Script#41
This implements support for linking back to commits where Gitlab's only given us a relative (i.e. just commit ref) or partial (just project name) reference
23-Apr-22 10:51
So, if I temporarily mention privacy-sensitive-analytics#9 we should get partial issue reference
23-Apr-22 10:52
Stupid smart commit closed my issue... reopening
23-Apr-22 10:58
mentioned in commit 0bb1c9a480051160b32b16633baaaa291ffe390a
Commit: 0bb1c9a480051160b32b16633baaaa291ffe390a Author: B Tasker Date: 2022-04-23T11:58:06.000+01:00Message
Handle partial issue references for websites/Gitlab-Issue-Listing-Script#41
This change means that we can handle partially qualified references (those missing the group).
23-Apr-22 10:59
This looks to be working, closing.