The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Validating all git changes from a plugin

Eddie S
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2014

I am trying to write a plugin that will validate all git changes that are done to stash. I am 90% there, but the 10% could kill my whole plugin.

I am able to validate all changes that are pushed via a pre-receive hook. That works great.

I am able to validate the merge action on all pull requests via a merge-check. That also works great.

However, a user still has the ability to delete a branch from the stash UI, or alternatively create a branch in the UI. That seems to totally bypass the above hooks. I know that I can control this via branch permissions, but I don't want to use this (since I don't always want to block users from writing or merging to these branches). I'd like to give users as much control on the repo as possible but still have these validations in place.

Is there any plugin hook that I am missing which could let me accept/reject these operations too? Alternatively, if there is a way to blanket disable those actions, that might also be acceptable.

Thanks for any help!

Regards,

Eddie

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Timothy
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 Champions.
May 1, 2014

Have you seen the EventListners *https://developer.atlassian.com/stash/docs/latest/how-tos/responding-to-application-events.html*?

TAGS
AUG Leaders

Atlassian Community Events