Subject: Support for fully-qualified repository URL in FogBugz Service Hook

Original Post adam.kocoloski's Avatar

adam.kocoloski

24 Apr, 2009 02:25 PM

Hi, I think it'd be very useful if the sRepo field included in the POST to FogBugz' cvsSubmit.[php|asp] URL could be "github_username/reponame" instead of just "reponame". I'm working on a project with multiple collaborators, each of whom has his own GitHub account and his own fork of the repository. We each have the same FogBugz Service Hook configured. When any one of us pushes to GitHub with a "BugzId: 12345" line in the commit, FogBugz receives the payload.

Unfortunately, since the sRepo value only specifies the repository name, we have no way of configuring FogBugz to generate the correct URL. We can only choose one user's repository. The links generated by FogBugz are 404s until the commit gets pulled into that one specific repository.

In the docs for the GitHub FogBugz Service Hock, the recommendation for multiple repos is to visit this URL. Well, the instructions on that page for FogBugz On Demand users suggest using the fully-qualified repository URL as sRepo. So now I'm back here :-)

I guess for backwards-compatibility reasons it would be better to have a checkbox to enable this option.

  1. Support Staff 2 Posted by defunkt on 24 Apr, 2009 11:06 PM

    defunkt's Avatar

    Any chance you can look at the code for the FogBugz hook and let us know what needs to be changed, or send a pull request?

    Thanks!

    http://github.com/pjhyett/github-services/blob/aa34d85d29688027b855d04e912a0dc32d3c22ef/services/fog_bugz.rb

  2. 3 Posted by adam.kocoloski on 25 Apr, 2009 12:02 AM

    adam.kocoloski's Avatar

    Sure, I can try to take a look tomorrow.

  3. 4 Posted by adam.kocoloski on 26 Apr, 2009 03:24 AM

    adam.kocoloski's Avatar

    This looks pretty straightforward to me. I don't know Ruby, but replacing line 3

    repository  = payload['repository']['name']
    

    with

    repository  = payload['repository']['name']
    if data['use_repo_url']
      repository = payload['repository']['url']
    end
    

    should do the trick, assuming a checkbox on the FogBugz Service Hook piece of the website that corresponds to 'use_repo_url'.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

25 Nov, 2009 03:07 AM
25 Nov, 2009 01:41 AM
25 Nov, 2009 01:27 AM
24 Nov, 2009 10:56 PM
24 Nov, 2009 10:54 PM