Git Product home page Git Product logo

git-pw's Introduction

git-pw

PyPi Status Documentation Status Build Status

git-pw is a tool for integrating Git with Patchwork, the web-based patch tracking system.

Important

git-pw only supports Patchwork 2.0+ and REST API support must be enabled on the server end. You can check for support by browsing /about for your given instance. If this page returns a 404, you are using Patchwork < 2.0.

The pwclient utility can be used to interact with older Patchwork instances or instances with the REST API disabled.

Installation

The easiest way to install git-pw and its dependencies is using pip. To do so, run:

$ pip install git-pw

You can also install git-pw manually. First, install the required dependencies. On Fedora, run:

$ sudo dnf install python-requests python-click python-pbr python-arrow \
  python-tabulate

On Ubuntu, run:

$ sudo apt-get install python-requests python-click python-pbr python-arrow \
  python-tabulate

Once dependencies are installed, clone this repo and run setup.py:

$ git clone https://github.com/getpatchwork/git-pw
$ cd git-pw
$ pip install --user .  # or 'sudo python setup.py install'

Getting Started

To begin, you'll need to configure Git settings appropriately. The following settings are required:

pw.server

The URL for the Patchwork instance's API. This should include the API version:

https://patchwork.ozlabs.org/api/1.1

You can discover the API version supported by your instance by comparing the server version, found at /about, with the API versions provided in the documentation.

pw.project

The project name or list-id. This will appear in the URL when using the web UI:

https://patchwork.ozlabs.org/project/{project_name}/list/

You also require authentication - you can use either API tokens or a username/password combination:

pw.token
The API token for your Patchwork account.
pw.username
The username for your Patchwork account.
pw.password
The password for your Patchwork account.

You can set these settings using the git config command. This should be done in the repo in which you intend to apply patches. For example, to configure the Patchwork project, run:

$ git config pw.server 'https://patchwork.ozlabs.org/api/1.1/'
$ git config pw.project 'patchwork'

Development

If you're interested in contributing to git-pw, first clone the repo:

$ git clone https://github.com/getpatchwork/git-pw
$ cd git-pw

Create a virtualenv, then install the package in editable mode:

$ virtualenv .venv
$ source .venv/bin/activate
$ pip install --editable .

Documentation

Documentation is available on Read the Docs

git-pw's People

Contributors

stephenfin avatar apconole avatar ezequielgarcia avatar mpe avatar neheb avatar tromey avatar

Watchers

 avatar James Cloos avatar

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.