使用github api和存储库列表创建pull请求
githubpullrequests的Python项目详细描述
创建请求
使用github api以编程方式创建pull请求。
使用量
$ githubpullrequests -h
usage: githubpullrequests [-h] [-f FILE] [-t TOKEN] [-mr MAXIMUM_REPOSITORIES]
[-c] [-s]
Create Pull Requests, using GitHub API and a list of repositories
optional arguments:
-h, --help show this help message and exit
-f FILE, --file FILE The file with the repositories informations
-t TOKEN, --token TOKEN
GitHub token with `public_repos` access, or the path
to a file with the Github token in plain text. The
only contents the file can have is the token,
optionally with a tralling new line.
-mr MAXIMUM_REPOSITORIES, --maximum-repositories MAXIMUM_REPOSITORIES
The maximum count of repositories/requests to process
per file.
-c, --cancel-operation
If there is some batch operation running, cancel it as
soons as possible.
-s, --synced-repositories
Reports which repositories not Synchronized with Pull
Requests. This also resets/skips any last session
saved due old throw/raised exceptions, because to
compute correctly the repositories list, it is
required to know all available repositories.
例如:
$ githubpullrequests -f repositories_list.txt
repositories_list.txt
示例:
[Anything Unique like evandrocoan/SublimePackageDefault] url = https://github.com/evandrocoan/SublimePackageDefault upstream = https://github.com/evandroforks/SublimePackageDefault branches = upstream_branch_name->fork_branch_name,
您需要使用具有public_repos
权限的GitHub访问令牌定义环境变量GITHUBPULLREQUESTS_TOKEN
,
或者将命令行参数-t token
传递给githubpullrequests
- https://stackoverflow.com/questions/47467039/how-to-create-github-pull-request-using-curl
- https://stackoverflow.com/questions/28391901/using-the-github-api-create-git-pull-request-without-checking-out-the-code
许可证
查看文件LICENSE.txt