Hi Jamie Echlin
We would like to require our users to enter jira issue number when they commit before they push the local repository in bitbucket. I looked at the Atlassian JAVADOC API and I found these packages (https://developer.atlassian.co..., https://developer.atlassian.co... to use. Also I found this groovy from Scriptrunner website which is similar what we want.
import com.atlassian.bitbucket.hook.HookResponse
import com.atlassian.bitbucket.repository.RefChange
import com.atlassian.bitbucket.repository.Repository
Repository repository = repository
Collection<refchange> refChanges = refChanges
HookResponse hookResponse = hookResponse
if (repository.name == "test") {
hookResponse.out().print("You cannot commit at the moment to any repository named 'test'\n")
return false
}
return true
Could you please tell me how I can modify this in order to require users to enter jira issue number when they want push to bitbucket?
Thanks