Forums

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

Bitbucket Server plugin development question on pre receive hook

gil
Contributor
September 23, 2018

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.

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2018

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events