Since we have way to many repos, i would love to configure all repos in a project using the REST api.
I already have exp with the REST api of stash, since we migrated all those 300 repos fro redmine to chili including projects/repos and the data which worked pretty smooth.
Now, i guess i will have to add hooks/repo . Is there a small snippet on how to do that? Thanks!
Community moderators have prevented the ability to post new answers.
basically. first you need to configure the hook using put on that API hook
self.class.put("/projects/#{project}/repos/#{slug}/settings/hooks/com.atlassian.stash.stash-hipchat-integration:hipchat-hook/settings", :body => {'roomName' => room,'authToken' => token}.to_json)
then you acticate the hook using
self.class.put("/projects/#{project}/repos/#{slug}/settings/hooks/com.atlassian.stash.stash-hipchat-integration:hipchat-hook/enabled" )
How to enable and configure hooks programmatically is outlined in the REST API documentation under:
https://developer.atlassian.com/static/rest/stash/latest/stash-rest.html#id136125
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.