Hey there,
I wanted to create an automation regarding the following:
- When a Pull Request is created, post a comment with the URL of the Pull Request into the comment of the Jira issue
- If a Code Reviewer is already added, mention the Code Reviewer in the comment too.
We have the following field (?) in the Jira Screen that already shows that there is a pull request but it would also be needed in the comment.
Maybe someone has a easy solution for this :)
Thank you already in advance!
-Vanessa
Hi @Vanessa
You can create a simple automation, for example (first part is optional):
Hi [~accountId:{{assignee.accountId}}],
A new PR is ready for you {{pullRequest.url}}!
You can read more about development smart values here: https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/
to the answer of of @Patrik Korovsky i‘d like to add:
The reviewer of a PR could be another person than the assignee. The reviewer is something living within the repository and is not connected to any increment in Jira (not even a user —> could be at least it doesn‘t have to).
Furthermore there is no smart value to retrieve the PR reviewer. To achieve this (i know in github) a webrequest could be sent to get this information via Rest API.
Best
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
so in general it works, but a small thing I do not want the Automation to take the Person from the Assignee field but from the field "Code Reviewer":
Our field is written this way:
In the Automation I wrote it like this:
Do I need to name it Code Reviewer.accountID ?
Or why would it not put the Code Reviewer in the comment? (The field is filled out, I just used an empty example picture here)
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Vanessa
As Stefan mentioned, the "Code reviewer" feature does not exist natively in Jira. So I assumed the next best thing is assignee.
Since you created a custom field, yes, you can use it instead of "assignee". I don't think you can use "Code Reviewer.accountID", but you can get the id for the custom field: "Hi [~accountId:{{customfield_XXXX.accountId}}]", where XXXXX is the custom field id.
You can find the id by following this guide https://confluence.atlassian.com/jirakb/how-to-find-id-for-custom-field-s-744522503.html
Cheers,
Patrik
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.