git pre-commit check Fisheye

Hi all,

Does Fisheye has some standard Crucible review instruments, those allow the pre-commit code review with the correctness commits check?

We need something such:

1. When a developer commits code to the ‘clean’ trunk, s/he must include the review’s card code into the commit’s comment, for example: “The code relates to the Jira ticket [XXXXXX-№] and review code is r:CR-YYYY-№”

2. The Hook parses the comment, gets the review code and

a. If the code is absent or points to non-existent review card, the commit is refused.

b. If the review card is not in the Closed state, the commit is refused.

c. If the files list attached to the review or their changing content does not coincide with the committing code, the commit is refused.

d. So, only if all the previous items are false, the Hook ‘allows’ the code to be committed.

2 answers

1 accepted

This widget could not be displayed.

Hi Viachaslau,

FishEye is accessing SCMs in read only way, so I'm afraid it is not possible to write commit hooks to refuse commits in the way you described. Although if you are hosting your repository in Stash you can implement commit hooks to do whatever checks you need. Alternatively you can look into the SCMs specific commit hooks and do whatever checks you need there.

Crucible provides REST endpoints so it is possible to connect to Crucible remotely and check review status etc. See https://docs.atlassian.com/fisheye-crucible/latest/wadl/crucible.html

Hope that helps,

This widget could not be displayed.

Thanks, Piotr

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 11 hours ago in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

32 views 1 3
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