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
Hi @Al Ma ,
Please try the following option (worked on my side):
{{branch.repository.name.substringAfter("/")}}
Hope this solves the problem.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am fighting the same issue now - that command does not seem to work in Cloud for me. Is there an updated smart value for this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That screenshot was from Cloud version.
Could you please describe your whole use case as well as screenshots of you automation rule?
Thanks in advance
best
stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is working now, can't say I did anything to fix it, but I may have and an extra space or character in there somehow. Thank you for being willing to help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.