Giter VIP home page Giter VIP logo

Comments (15)

froydnj avatar froydnj commented on June 3, 2024

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.

froydnj avatar froydnj commented on June 3, 2024

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.

amccreight avatar amccreight commented on June 3, 2024

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.

globau avatar globau commented on June 3, 2024

bmo's api docs are at http://bmo.readthedocs.org/en/latest/api

from git-bz-moz.

amccreight avatar amccreight commented on June 3, 2024

I'll start taking a look at this today.

from git-bz-moz.

amccreight avatar amccreight commented on June 3, 2024

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.

Nephyrin avatar Nephyrin commented on June 3, 2024

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.

amccreight avatar amccreight commented on June 3, 2024

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.

Nephyrin avatar Nephyrin commented on June 3, 2024

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.

Nephyrin avatar Nephyrin commented on June 3, 2024

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.

amccreight avatar amccreight commented on June 3, 2024

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.

amccreight avatar amccreight commented on June 3, 2024

The readme contains basic instructions on dealing with the bugzilla API key.

from git-bz-moz.

indygreg avatar indygreg commented on June 3, 2024

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.

indygreg avatar indygreg commented on June 3, 2024

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.

amccreight avatar amccreight commented on June 3, 2024

I landed this a few months ago.

from git-bz-moz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.