Git Product home page Git Product logo

git-phabricator-mirror's Introduction

Git/Phabricator Mirror

This repo contains code that automatically mirrors source code metadata between git-notes and Phabricator.

Setup

This tool expects to run in an environment with the following attributes:

  1. The "arcanist" command line tool is installed and included in the PATH.
  2. A ".arcrc" file is located where arcanist will find it, specifies a URL for a Phabricator instance which should be used for any repos that do not override the default instance, and provides auth credentials for every Phabricator instance that is used.
  3. The current working directory contains a clone of every git repo that needs to be mirrored.
  4. The git command line tool is installed, and included in the PATH.
  5. The git command line tool is configured with the credentials it needs to push to the remotes for all of those repos.
  6. The "mysql" command line tool is installed, and has been preconfigured with the IP address, username, and password necessary to connect to the Phabricator database. This is a (hopefully temporary) workaround to the fact that the Phabricator API does not yet support querying revision transactions.

Installation

Assuming you have the Go tools installed, run the following command:

go get github.com/google/git-phabricator-mirror/git-phabricator-mirror

Metadata

The source code metadata is stored in git-notes, using the formats described here.

git-phabricator-mirror's People

Contributors

ckerur avatar ojarjur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git-phabricator-mirror's Issues

The mirror should only write comments to git-notes if the corresponding review is in git-notes

Right now, there is a bug in this logic here.

Specifically, this tries to read the comments from Phabricator, and write any new ones that it sees to git-notes. However, the only existing comments that it compares against are those attached to a review written in git-notes.

This means, that for reviews that do not have a corresponding request in git-notes, we will write the comments to git-notes over-and-over again until the review is closed.

To fix this, the logic should check that the first commit in the review has a review request written to git notes, and if it does not, then we should not mirror the comments into git-notes.

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.