Review Enforcement for Perforce (Trigger?)

We would like to enforce code reviews before committing to the repository. We use Perforce. Apparently we cannot do reviews on Shelved submits (BTW: https://www.atlassian.com/software/crucible/overview/code-review-pre-commithints at "pre-commit reviews but I fear that's only for Git). We also want to insure that code is not submitted for production use unless it's review and approved. I assume we need to do this with a Perforce trigger but I have been unable to find one. Is there one? Can it also selectively enforce this (based on say paths into the depot)?

1 answer

0 vote

Hi Andrew,

According to this document, the only ways of reviewing code before committing it is by creating pre-commit patches or by uploading files. All the other ways of adding code into a review (Browse Changesets, Explore Repositories, and Search for Files) require the code to have been committed.

Pre-commit reviews can be created for Perforce as well, not only for Git, by using the command line.

It's currently impossible to use shelved commits in Crucible:

https://jira.atlassian.com/browse/CRUC-3378

https://jira.atlassian.com/browse/CRUC-617

Maybe before submitting the code for production you can commit this code into a Perforce branch, then have a separate repository in FishEye/Crucible that will only index code from this specific branch (by specifying the branch name in the Path configuration in FishEye/Crucible) allowing you to review code committed into it, and once it's reviewed and approved you can submit the code into production?

Kind regards,
Felipe Kraemer
Atlassian Support

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Tuesday in Uncategorized

Friday fun: how many celebrates Midsummer holiday or is this a Swedish tradition only?

Any other country that celebrates Midsummer holiday (this friday 22 June)?  

44 views 3 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you