使用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

  1. https://stackoverflow.com/questions/47467039/how-to-create-github-pull-request-using-curl
  2. https://stackoverflow.com/questions/28391901/using-the-github-api-create-git-pull-request-without-checking-out-the-code

许可证

查看文件LICENSE.txt

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java使用split函数分割字符串,但没有得到期望的结果   未找到包含derby数据库嵌入架构的sql Java桌面应用程序错误   java elasticsearch vs solr用于定制全文搜索系统   java Android:创建没有startOffset的动画延迟?   java如何查看其他应用程序接收的数据?   java如何在Linux中使用D和classpath选项运行jar文件   java和域设计最佳实践   具有相同内存位置的java数组,将显示为输出   连接到java中的elasticsearch?   Java Playframework重定向到带有Json负载的外部url   java无法在Android平台上使用InputStream为蓝牙socket创建ObjectInputStream   使用POI将Excel日期转换为Java日期,年份未正确显示   oracle从数据库层还是Java层调用webservice?