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

Stash + Hipchat : Configure all repos in a project ( using REST?)

Eugen Mayer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2013

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!

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Eugen Mayer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 1, 2013

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" )

0 votes
Jens Schumacher [Atlassian]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 25, 2013

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.

TAGS
AUG Leaders

Atlassian Community Events