getpatchwork / git-pw

A tool for integrating Git with Patchwork, the web-based patch tracking system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

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

On Ubuntu, run:

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

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.2

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. For example, if your server is running Patchwork version 3.0.x, you should use API version 1.2.

__ https://patchwork.readthedocs.io/en/stable-3.0/api/rest/#rest-api-versions

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/

For read-write access, you also need 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.

If only read-only access is desired, credentials can be omitted.

The following settings are optional and may need to be set depending on your Patchwork instance's configuration:

pw.states

The states that can be applied to a patch using the git pw patch update command. Should be provided in slug form (changes-requested instead of Changes Requested). Only required if your Patchwork instance uses non-default states.

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:

Development

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

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

Documentation

Documentation is available on Read the Docs__

About

A tool for integrating Git with Patchwork, the web-based patch tracking system

License:MIT License


Languages

Language:Python 100.0%