Hello,
I am trying to follow thru a sample code to develop a Bitbucket plugin for pre receive hook, and run into a problem. Hopefully someone can help me out.
I tried to follow the sample here: https://bitbucket.org/atlassian/bitbucket-server-example-plugins/src/9e1728cfab668ab0f8c1c4ada507994dffa5b5e6/hooks-guide/src/main/java/com/atlassian/bitbucket/server/examples/WorkInProgressHook.java?at=master&fileviewer=file-view-default
I was able to compile the plugin, and installed it into Bitbucket. When I did the commit with 'Work in progress' in commit message using Git client, and pushed to Bitbucket main repo, it is working as expected. When I did the commit via the Bitbucket UI with those keywords in commit message, I also got the reject. However, the error message is not the error message placed in the pre-commit code. Instead, it says:
"You don't have write permissions for this branch
You must create a pull request to commit this change."
I did not set any permission in the branch which results in this error. I think there's something wrong here where the error message from the code is not associated with the Bitbucket error message. Can someone advise if I am missing something here?
Thanks.
Hi Gil!
For questions related to development, I'd advise you to visit our Developer Community. You'll be more likely to find your answer there.
Hope that helps!
Ana
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.