Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

When to use Auto-Add versus Dynamically add reviewers to PR using ScriptRunner Listener?

Scarlett Jones September 10, 2024

Is the only difference between them that dynamically add will update when a PR is updated, while auto-add will only add when a PR is created?

 

If using dynamically add, if the members of a mandatory reviewer group are updated (new members added), and the PR is updated, will it get the new members added to the PR?

 

Does updating a PR refer to only adding/removing commits? What about editing the PR description/title or anything else you can edit without making a new commit?

 

Documentation:

https://docs.adaptavist.com/sr4bib/8.34.0/features/listeners/built-in-listeners/auto-add-reviewers-to-a-pull-request

"Using this script, you can automatically add reviewers when a pull request (PR) is created."

 

https://docs.adaptavist.com/sr4bib/8.34.0/features/listeners/built-in-listeners/dynamically-add-reviewers-to-a-pull-request

 

"Using this script, you can dynamically add default and mandatory reviewers based on a script when a pull request (PR) is created or updated."

1 answer

0 votes
Max Lim _Adaptavist_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 21, 2024

The main difference is that, for dynamically add reviewers listener, the "configuration script" field allows you to script more complicated logics on adding the reviewers.

For example, you might want a reviewer from same time zone as mandatory, reviewers from different time zones as normal reviewers.

For time zone use case, there is an related merge check example for enforcing reviewers in several timezones.

Hope this helps.

Scarlett Jones September 26, 2024

Thank you. I also found both will trigger for the same events (PR opened or updated with new commits).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events