In the "Repository links" section of the "Repository settings", we have "Custom" links configured for JIRA ticket mentions.
E.g., given one our JIRA projects might be "XYZ", then
Custom ((?<!\w)((XYZ)-\d+)(?!\w))
would be configured as linking to
https://ourjira.domain.org/browse/\1
Problem is that, across our hundreds of modules, the links are not consistent (e.g., some will rightfully have other projects in the pattern, e.g., Custom ((?<!\w)((XYZ|ABC|DEF)-\d+)(?!\w))). Some repositories even have a wrong server configured in the links; some have both the right and the wrong one.
Unfortunately, it is unclear how these links have been configured in the first place. However, we would like to consolidate them without clicking through every repository.
Is there a way to modify the links via the REST API? The documentation does mention "links" in examples, but it is not clear to me if these are the links in the settings or something else entirely.
I apologise if I have missed a stated solution - the search term "repository links" etc. just isn't very specific ...
Cheers
C.
@Christian B_ If I were you, I would do this:
If you can find this string, then you identified the JSON field which stores it.
Hey, of course, good idea, thanks - I'll try that and let you know how it went.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It turns out that, unfortunately, it these links are not included in the repository's JSON description.
I have checked the "top-level" JSON (at https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}) for my custom link, as well as a few of the sub-level entries, even though none of them really sounded related (e.g., ".../hooks").
As far as searching the REST API description for further possible points of entry goes, "links" is obviously not a good search term, and I am not even sure it would be the right one for these links, so I am not 100% sure I might have missed something, but I guess it seems this is not editable via the REST API.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.