-
Notifications
You must be signed in to change notification settings - Fork 22
Use the Bugzilla REST API #30
Comments
This seems a bit more important now that setting review flags via |
Bugzilla's REST API looks like a more-or-less straightforward translation from what we were using for |
FWIW, I haven't had any problems recently with reviewer flags, but we do have at least one report from somebody (a while back) who had trouble with some reviewers. I think the best approach here is to re-use hg bzexport, so we don't have to reimplement all of the bzapi stuff. We could probably turn git-bz-moz into a thin wrapper around the scripts there. I looked into that a little yesterday. The code lives at: |
bmo's api docs are at http://bmo.readthedocs.org/en/latest/api |
I'll start taking a look at this today. |
I have a prototype up at https://github.com/amccreight/git-bz-moz I pulled in a lot of the bzexport bugzilla backend. I managed to attach a patch, but there's a lot of the other functionality that does not work still. |
Might be worth hooking up bzexport as a submodule such that it's easier to stay in sync rather than pulling in their files, unless we just want to use them as a base and fork them |
The basic problem is that bzexport is in hg, not git. So I'd have to set up a git mirror or something. |
With the hg-git tool it's pretty easy to make a git mirror: Here's a script to do this, which we could dump in this repo somewhere: #!/bin/bash
set -e
### Setup a temp dir that is destroyed on exit
unset tmpdir
cleanup() { [[ -z $tmpdir ]] || rm -rf "$tmpdir"; }
trap cleanup EXIT
tmpdir="$(mktemp -d --tmpdir sync_bzexport_to_git.XXX)"
[[ -n $tmpdir ]] || exit 1
cd "$tmpdir"
### Do the thing
set -v
hg clone https://hg.mozilla.org/hgcustom/version-control-tools/
cd version-control-tools
hg bookmark -r tip master
# If this gives command not found, you need to install hg-git
hg gexport
cd .hg/git
git remote add github git@github.com:mozilla/bzexport.git
git push github master The I created a branch on my repo that pulls it in as a submodule:
The downside to this approach is that you need to sync the GitHub mirror whenever you want to bump the submodule version, but that just requires having hg-git installed and running above mirror sync script |
Err, apparently the upstream URL we want is https://hg.mozilla.org/hgcustom/version-control-tools/ not http://hg.mozilla.org/users/tmielczarek_mozilla.com/bzexport/ |
I've update my prototype. Most commands at least sort of work (git push and git edit do not). It also does not yet handle review flags for the Firefox component. |
The readme contains basic instructions on dealing with the bugzilla API key. |
Please don't set up your own Git mirror of version-control-tools. This is something I can do using Mozilla's official vcs mirroring tools. |
https://github.com/mozilla/version-control-tools should have content soon. That repo is read-only. But if you send pull requests I'll look at them. |
…erver. This is enough to get |git bz apply| to work. Fixes issue mozilla#30.
I landed this a few months ago. |
No description provided.
The text was updated successfully, but these errors were encountered: