Subject: Expand Web Hooks Information / Torch Support
Hi Folks, I've added integration through Web Hooks for Torch Project Management:
http://blog.wbpsystems.com/2009/05/17/beanstalk-integration-with-torch-project-management-for-developers/
However, I would really like it if you posted some additional information in the JSON:
- The real name of the user
- The base URL of the particular repository that the commit is related to
The first because while I'm using the user name to do user name matching (before it fails back to a default user), there is no grantee that the person uses the same user name in both programs and I would rather do matching on that.
The second because it would be really neat to be able to provide a link to to the file that changed.
Thanks!
Ben
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Chris Nagele on 18 May, 2009 12:39 AM
Nice ideas. Thanks Ben. I will have someone add this to our backlog. We have a lot going on, so I can't promise anything right away.
Chris
3 Posted by ben on 18 May, 2009 06:08 PM
Chris -
If I can expand on this given some of the support questions I've received from my customers in the past 24 hours.
What would also be nice is a JSON post containing the same style of info as the commit, but instead have it in the POST field "release" (when a release is performed), and the files that are listed would be files that have changed sense the last release (not necessarily the last version).
There are situations where they only want releases to be posted (Torch access is often provided to the client).
Also, I noticed that we both use the same style of additional commands and I wanted to make sure we don't run into each other. Right now, I'm looking for:
In the commit message. If I expand this in the future, what words to do I need to stay away from? I know you have [review:ETC] and [ignore]; but are there others I should be aware of? Also any in development that I should stay away from?
Support Staff 4 Posted by Igor Baloš on 19 May, 2009 08:35 AM
Hi Ben,
thank you very much for feedback, I've added this to our backlog for review. For the questions bellow, I've attached our developer to discussion to give you more information.
Thanks , Igor
Support Staff 5 Posted by Petyo Ivanov on 19 May, 2009 09:11 AM
Hi Ben,
I will try to include the requested additional attributes from your first post this week. We have a release coming anyway.
As far as I understand your second post, you're looking for web hook notifications for releases. Is this so? I think that this should be a separate part from the commit web hooks. We will discuss this suggestion.
6 Posted by ben on 19 May, 2009 08:07 PM
Hi Petyo -
Thank you so much for adding those attributes. I'd also suggest adding e-mail of the submitting user given it is the only personal info left not included (and I suspect that someone down the road will ask for it and it is probably easier to add while you are also doing name), however I personally don't need it.
As to my second post; I was suggesting that you should have web hook notification on release. However, while this is obviously your choice, I would suggest implementing it in similar way to my description. Having a separate URL that the user has to enter would make setting up integration more difficult for the end user (they would have to enter two URLs instead of just one). This is especially of importance if the goal is to expand version control beyond programmers (which I believe to be appropriate).
However, I was also trying to get a list of the commands you look for in the commit message (e.g. [ignore], [review:], any more?). I'm scanning for three of my own at the moment (as I described in my first reply), but I may expand in the future. It's important I don't use a term you are also looking for because it would result in it being removed by the time I receive it. Or worse, you leave it in, but it does something in the beanstalk account that the user didn't intend.
Thanks, Ben
Support Staff 7 Posted by Petyo Ivanov on 20 May, 2009 12:18 PM
Hi Ben,
The thing that initially worries me about pinging web hooks for releases is that people may execute operations regardless of the contents posted, which will trigger actions when commit has not happened. But this deserves much more thought than what I have given so far :).
As for the messages (sorry, I had to look them up thoroughly), here is what we parse: ignore (stopping further parse) review (links to review) case/bug/bugs/bugz - fogbugz integration assign - fogbugz integration deploy - triggers deploys on our side. status - fogbugz again. task, time, which are used for harvest integration. and f(some number), which triggers freckle.
Should you need any more information, don't hesitate to ask.
Thanks, Petyo
8 Posted by ben on 24 May, 2009 02:57 PM
Petyo -
Could you post a comment here or something when you add the attributes so that I know to go look at the raw json again.
Thanks!
9 Posted by ben on 02 Jun, 2009 06:04 PM
Petyo -
It looks like these new attributes didn't get included in the release you reference in post 4. Any update on this?
Support Staff 10 Posted by Petyo Ivanov on 04 Jun, 2009 12:26 PM
Hi,
Unfortunately we did not manage to include the update due to the short timeframe, and lack of time for testing. The task is pending on my queue, I will try to implement it for the next release.
Sorry for the delay, we strive to not accidentally break something.
11 Posted by ben on 23 Jun, 2009 05:21 PM
Petyo -
Not to be a pest, but any ETA on this?
Support Staff 12 Posted by Ilya Sabanin on 02 Jul, 2009 04:33 PM
Hi,
Petyo Ivanov is currently on vacation, but I think I can help you. We are talking about adding next two attributes to the Web Hooks json response:
Is that correct?
13 Posted by ben on 02 Jul, 2009 04:41 PM
Yes.
I also think that you should add the e-mail address to the JSON given that someone will probably use it and it is the only remaining personal info the commiter and probably easier to add now.
Support Staff 14 Posted by Ilya Sabanin on 02 Jul, 2009 04:51 PM
Ok, I will add these three attributes (including the email) to WebHooks today and probably deploy to production tomorrow.
15 Posted by ben on 02 Jul, 2009 04:53 PM
Thanks! I really think this will improve the implantation in Torch because the user will be able to click on the changed file and see what changed (especially with your new source code coloring)
Support Staff 16 Posted by Ilya Sabanin on 03 Jul, 2009 04:51 AM
Just wanted to let you know that this is now deployed to production. Can you please check how it's working for you?
Thanks.
17 Posted by ben on 03 Jul, 2009 05:26 AM
It works perfectly; I tested my implementation and it is now deployed to the Torch Project Management hosted version.
Just a couple of documentation mistakes on this page:
http://help.beanstalkapp.com/faqs/integration-tools/trigger-a-url-on-commit-with-web-hooks
In the example JSON you have the following URL:
repository_url: "https://account.beanstalkapp.com/repo"
That isn't the case. The actual example would be:
repository_url: "https://account.svn.beanstalkapp.com/repo/"
Note the svn and the trailing slash.
Thank you so much for the variables, I'll write a blog post about our implementation for our customers tomorrow.
Support Staff 18 Posted by Ilya Sabanin on 03 Jul, 2009 05:31 AM
I'm glad it works for you!
Repository URL is a mistake, we wanted to provide an URL without "svn". I will fix that today.
Support Staff 19 Posted by Ilya Sabanin on 03 Jul, 2009 11:57 AM
Hey,
I decided to change "repository_url" attribute to "changeset_url" that will point to exact revision in Beanstalk interface. Something like this:
https://accountname.beanstalkapp.com/repositoryname/changeset/44
You can use that URL to determine just repository URL of you like.
This will be in production today.
20 Posted by ben on 03 Jul, 2009 02:57 PM
Thanks for letting me know. I've made an update that should make it work with either the current setup or the new setup whenever you deploy it.
Thanks!
21 Posted by ben on 03 Jul, 2009 05:14 PM
Blog post on our update:
http://blog.wbpsystems.com/2009/07/03/improved-beanstalk-integration-in-torch-project-management/
Support Staff 22 Posted by Ilya Sabanin on 03 Jul, 2009 05:37 PM
Thanks! Keep up the good work guys.