Tool for creating and updating pull requests on GitHub.
Project description
Tool for creating and updating pull requests on GitHub.
Integrates with Jira API to fetch corresponding Jira ticket title and sets it in pull request (mapping is done between branch name and jira ticket key "proj_xxxx" -> "PROJ-XXXX").
Pull request description template path can be specified in configuration.
Supports setting team reviewers in the pull request.
Usage
Create config file ~/.config/lazy_pr.ini and set following values there:
[default]
jira-api-token = <jira api token>
jira-email = <jira email>
github-token = <your github token>
repo = <repository>
repo-path = <repository local path>
pr-base = master
pr-team = <team on github>
pr-desc = <pull request template file local path>
Alternatively, path to .ini config file can be specified as a command line
argument (-c or --config-file-path).
lazypr -c '/home/sanja/.config/lazy_pr.ini'
Command line argument -cs or --config-section can be used to specify config
section. If not specified, "default" section is used.
Options can be set either in config file, as environment variables or as
command line arguments (run lazypr --help for more details):
usage: lazypr [-h] [-c CONFIG_FILE_PATH] [-cs CONFIG_SECTION]
[-jt JIRA_API_TOKEN] [-je JIRA_EMAIL] [-gt GITHUB_TOKEN]
[-r REPO] [-rp REPO_PATH] [-b BRANCH] [-s PR_BASE] [-t PR_TITLE]
[-d PR_DESC] [-tm PR_TEAM]
Examples
- Create pull request for branch
lp_1in repositorysanjaz/lazypr.
Both branch and repository can be specified as command line args:
lazypr -r "sanjaz/lazypr" -b "lp_1" `
In case repository command line arg is omitted, repository will be fetched from
repo value in config file.
lazypr -b "lp_1"
In case branch is not specified, it looks for current branch in local
repository (local repository path is set in repo-path in .ini config file):
lazypr
Or local repository path can be specified as command line argument (and current branch in local repository will be used):
lazypr -rp "/home/sanja/moto/lazypr"
- Pull request title can be specified using command line argument
-t(--title):
lazypr -b "lazypr_1" -t "Test title"
If not specified, title will be fetched from the corresponding Jira ticket. Branch name is mapped to Jira ticket key as proj_xxxx -> PROJ_XXXX.
- Pull request description template path can be specified whether in .ini
config file (
pr-desc), env variable or as a command line argument-d(--pr-desc).
lazypr -d "/home/sanja/moto/lazypr/.github/PULL_REQUEST_TEMPLATE.md"
- Pull request base branch (target branch where the pull request will be merged) can be specified as command line argument:
lazypr -s "release"
If omitted, default is specified in .ini config file (usually master).
- GiHub team can be assigned to review the pull request with:
lazypr -tm "my-team"
If omitted, default is specified in .ini config file.
Notes
- How to find/generate Jira API token: log in to https://id.atlassian.com/manage/api-tokens and click "Create API token". For more details, check https://confluence.atlassian.com/cloud/api-tokens-938839638.html
- How to find your user Jira email: https://id.atlassian.com/manage-profile/email
- How to find/generate github token: https://github.com/settings/tokens. Some details can be found here: https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazypr-0.1.4.tar.gz.
File metadata
- Download URL: lazypr-0.1.4.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d989c15ecff7e9cde48792d439325e7ef629621bc961abbbca543f2d93aaaad8
|
|
| MD5 |
dafb565fbe7c6f31cfce16d43e25fc38
|
|
| BLAKE2b-256 |
ff20ca88cbf253864efaf56f41906b13db01a0c19d72dac0bbe55bf0f0aa40eb
|
File details
Details for the file lazypr-0.1.4-py3-none-any.whl.
File metadata
- Download URL: lazypr-0.1.4-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06777bd5860c0b677e09e921142ae2591ee3184bf9efff8c999be60aa02d2ca5
|
|
| MD5 |
6adf276fdf0659585ace28edbebf768c
|
|
| BLAKE2b-256 |
52eb3e962acba91151be714e9c2082ef5c98ff8cd7c51537fca69ef36db81ce8
|