3

How do I setup integration between FogBugz and Github?

flag

5 Answers

3

Updated by Fog Creek Support

First, go to your repository in Github. Click on the Admin button and then on service hooks. Click FogBugz in the list. Here are the instructions as posted there:

Install Notes

  1. Requires FogBugz version 6.1 or above, and your FogBugz installation must be accessible from the internet

  2. "cvssubmit_url" is the url to the cvsSubmit.[php|asp] file on your FogBugz server. Example: https://server.com/fogbugz/cvsSubmit.php or https://yoursite.fogbugz.com/cvsSubmit.asp

  3. The "sRepo" field (in FogBugz 6.1) will be automatically set to the name of this GitHub repository.

  4. The "ixRepository" field (in FogBugz 7.0 and later) will be set to the fb_repoid set in the hooks configuration page

FogBugz 7.0 and later, FogBugz 8.0 and later Configuration

FogBugz 7 and FogBugz 8 have a configuration page for multiple repositories. Each repository is given an ID that will be used by the cvsSubmit.asp page.

  1. From the FogBugz Admin menu, select Source Control.

  2. Click 'Create New Repository'.

  3. An option pane will pop up. Select 'Other (custom)'. Enter a name for the repository. The name does not have to be the same as the github repo name. Click Next.

  4. Set the 'Diff URL' field to be: https://github.com/[github_username]/[github_reponame]/commit/^R2

  5. Set the 'Log URL' field to be: https://github.com/[github_username]/[github_reponame]/commits/^FILE

  6. There's a URL printed at the top of the configuration screen. Make note of the number following ixRepository= That is the ID that needs to be filled in for the fb_repoid field.

In GitHub > Admin > Service Hook after selecting "FogBugz" from the list:

  1. Set your Cvssubmit Url. Example: https://server.com/fogbugz/cvsSubmit.asp

  2. Set "Fb Version" to the version you are running. This does not have to be the full version as the major version number is sufficient. For example. "8" for the current version of FogBugz On Demand 8.8.41, or "6" if you're still running version 6 of FogBugz For Your Server. To find your FogBugz version, go to your FogBugz URL, for example https://server.com/fogbugz, and look at the page footer, or going to FogBugz > Help > About FogBugz and in either case you'll see, for example, "FogBugz Version 8.8.41 (DB 797, Build 0)".

  3. Set "Fb Repoid" to the number following "ixRepository=" from step 6 above.

Once the integration is complete and you push some new changes to your GitHub repository referencing FogBugz Cases, you will see Checkins on the Case page. For example: GitHub Integration Example

FogBugz 6.1 Configuration

If you want to use GitHub as your sole source control system, configuration within FogBugz is relatively easy.

In your site configuration:

  1. Set "the Source Control URL for logs" field to be: https://github.com/[github_username]/^REPO/commits/^FILE

  2. Set "the Source Control URL for diffs" field to be: https://github.com/[github_username]/^REPO/commit/^R2

If you have commits in FogBugz from a previous source control system, or if you want to use multiple GitHub accounts, please read:

In the service hook here:

  1. Set your Cvssubmit Url.

  2. Set "Fb Version" to "6" (without quotes).

  3. Leave "Fb Repoid" blank.

http://www.fogcreek.com/FogBugz/KB/howto/MultipleRepositories-Mult.html

Using the Integration

See this guide for how to use the integration.

link|flag
1

The trick is that the script on github expects the string "7.0" for the version. anything else ("7", "8", "7.2") causes it to use the old-style source-control integration, which doesn't send the ixRepository parameter. If that change doesn't fix it, please send us an email: http://www.fogcreek.com/sendmail.html

link|flag
GitHub has improved over the time, I can now put in "8.7.60" as version and it still works. – Jacco Rademaker Jul 3 at 9:12
I updated it a while back so that "6" uses the old system and any other value for the version uses the new 7+ system. – adambox Jul 5 at 13:15
I have updated the question and answer above with the docs – adambox Jul 5 at 13:22
0

Did you ever figure out how to mark a commit as being related to a bug, or resolving a bug, from the commit message? And what constitutes the "commit message", do I have to put it on the first line of my message (the title) or can I put it in the body?

link|flag
This is what I've been doing, it may not be the only way, but it works. During a git commit, I provide comments of the form: "See buzgid:123. Brief summary of the fix. <blank link> Longer explanation." My $EDITOR is vim, so I see colour highlighting on these comments, making the difference between brief comment and full comment obvious. The brief comment is very brief, and shows correctly in Hudson etc when summarising the change. There may be other magic words other than "bugzid:". – David Kennedy Feb 15 2011 at 9:04
you cannot resolve cases via commit message, though it is possible to write a Plugin which would add this. The integration only serves to recognize "bugzid:1234" in the commit message and add a link to the commit in fogbugz case 1234. see this post fogbugz.stackexchange.com/questions/2382 – adambox Apr 14 2011 at 16:57
0

The above seems to imply that you must set this up per code repo as opposed to a server. So for example if you have mygithub.com/myorg/A and mygithub.com/myorg/B you would need 2 entries in FogBugz. Not bad if you have 2 Repos. In our case we have about 230 code repos (for various things) so we would have to do this for everyone and every new one?

Seems like FogBugz should just accept pathes to change sets verbatim and put the logic in the git plugin, no? Maybe I am missing how Fogbugz deals with the code changes, is there a good doc explaining it?

link|flag
Here are the docs on how source control integration works in FogBugz 7 and 8: fogbugz.stackexchange.com/questions/4437 – adambox Jul 5 at 13:23
0

Hi, We use Fogbugz in our company. We wanted to integrate it with cvs, also we don't use cvsweb, but use Bonsai cvs web interface. I went through this documentation http://www.fogcreek.com/fogbugz/docs/70/topics/sourcecontrol/setup/CVS.html

of integrating cvs with Fogbuz. Is this all we need to or is there a mock up examples of how we use cvs within fogbugz somewhere?

Thanks.

link|flag
To get answers, you might want to move this "answer" to a separate question, through the Submit Feature Request button (I know, sounds weird). – Michel de Ruiter Sep 6 at 7:50

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.