Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pre-commit and post-commit hooks from svn to bitbucket

Mithlesh
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!
January 31, 2024

As part of migration from svn to bitbucket on premise, we have some custom pre and post commit hooks which needed to be migrated to server end on bitbucket. How this could be done? I could not find any information online .

1 answer

1 vote
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 31, 2024

Custom hooks should be implemented as parts of a custom app for Bitbucket Server (and Data Center).

The two relevant modules you should implement are these:

  1. https://developer.atlassian.com/server/bitbucket/reference/plugin-module-types/pre-receive-hook-plugin-module/
  2. https://developer.atlassian.com/server/bitbucket/reference/plugin-module-types/post-receive-hook-plugin-module/

We have developed a few these, and they work reliably.

Mithlesh
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!
February 2, 2024

I agree about thase. But I am asking about pre-commit and post-commit to be implemented at server level so that whenever a developer clones the repo,the hooks are available to him. 

Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 2, 2024

Those modules are parts of apps that run on the server!

That means that everyone who tries to push to the server-side origins, will trigger the two hook types I mentioned. Just read the docs!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events