Comments (15)
This seems a bit more important now that setting review flags via git bz attach
is no longer working, see https://bugzilla.mozilla.org/show_bug.cgi?id=1150057
from git-bz-moz.
Bugzilla's REST API looks like a more-or-less straightforward translation from what we were using for attachment.cgi
; I'm going to try twiddling with that.
from git-bz-moz.
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:
https://hg.mozilla.org/hgcustom/version-control-tools/file/819a2f07c285/hgext/bzexport
from git-bz-moz.
bmo's api docs are at http://bmo.readthedocs.org/en/latest/api
from git-bz-moz.
I'll start taking a look at this today.
from git-bz-moz.
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.
from git-bz-moz.
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
from git-bz-moz.
The basic problem is that bzexport is in hg, not git. So I'd have to set up a git mirror or something.
from git-bz-moz.
With the hg-git tool it's pretty easy to make a git mirror:
https://github.com/Nephyrin/bzexport
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 [email protected]:mozilla/bzexport.git
git push github master
The hg gexport
command just exports the Hg repository to a git tree in .hg/git
, and the bookmarks are turned into git branches.
I created a branch on my repo that pulls it in as a submodule:
https://github.com/Nephyrin/git-bz-moz/tree/bzexport
git submodule update --init
should create/update any submodules
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
from git-bz-moz.
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/
from git-bz-moz.
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.
https://github.com/amccreight/git-bz-moz/tree/RestAPI
from git-bz-moz.
The readme contains basic instructions on dealing with the bugzilla API key.
from git-bz-moz.
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.
from git-bz-moz.
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.
from git-bz-moz.
I landed this a few months ago.
from git-bz-moz.
Related Issues (20)
- git bz attach -e HEAD leads to ImportError: No module named auth HOT 5
- Add a way to assign the bug to yourself when attaching a patch HOT 1
- git bz apply adds a bogus "Bug 1234567" to the commit message HOT 3
- ImportError: No module named requests HOT 3
- adding bug #s to commits doesn't check for existing bug numbers HOT 2
- git bz apply should work for bugs with mozreview request attachments HOT 1
- `add-url-ignore-remote-commits = true` should be the default HOT 4
- trying to self-review a patch with :me causes errors HOT 4
- Insufficient detection of conflict when specifying bug number on the command line
- Add testing mode that does not push to bugzilla HOT 2
- `git bz apply` uses `git am` HOT 1
- attach fails with KeyError: 'data' if the bug has a MozReview patch HOT 1
- Remove MozReview cruft from the commit message on export HOT 1
- Unicode decoding error in 'git bz apply' HOT 3
- RuntimeError: git rev-list didn't return a number of lines divisible by 3 HOT 3
- git bz apply should get mozreview patch information from hg changeset HOT 6
- Need better error message when the reviewer doesn't accept the review requests HOT 4
- "git bz apply" treats the virtual/hidden commit-message from MozReview as part of the patch HOT 8
- Cannot git bz apply patches in Bug 1375969 HOT 1
- filing bugs with commits ending in "; r=build-peer" does not strip the r= info for the bug title HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git-bz-moz.