Hi all,
I'm trying to configure a JIRA automation rule where whenever a branch and/or commit is linked to an issue, a label would be added using the name of the repository.
The rule is working great when a commit is linked however when a branch is linked the name of the repository contains the OWNER part of the url.
The problem is that if the branch and commit both link to the same issue, it will create two labels using the repo name, but one of them contains OWNER/
Is there a way I can retrieve the name of the repository from {{branch.repository}} WITHOUT the OWNER part?
For example:
Given repository:
https://github.com/OWNER/my-test-repo
When commit created:
{{commit.repository}} = my-test-repo
Label added: my-test-repo
When branch created:
{{branch.repository}} = OWNER/my-test-repo
Label added: OWNER/my-test-repo