Github回购监视客户端。

watching的Python项目详细描述






>github-repos-repos-repos-repos-repos-repos-watching框架




`` shell
/>pip-install-watching
` ` `
/>

简单用法



ctx函数`ctx.upsert_file_和u pr是更新或创建文件以及创建请求请求请求的助手。



``python
watcher=watcher=watcher=watcher=watcher
er({
“github访问令牌”:访问令牌,
}



def license_中间件(ctx:context):
branch='watcher_license_create'
path='/license'
new_content='mit\n\ncreated by joway'
message='add mit license'
pr title='init:mit license'
pr body='-create mit license'

file_branch='master'

ctx.upsert_file_和_pr(
path=path,content=new_content,branch=branch,
should_upsert=lambda new,old:new!=old,message=message,
pr戋title=pr戋title,pr戋body=pr戋body,





pass



def filter戋func(repo:repo):
如果repo.name='repo watching demo':
返回true




它将由每个repo
观察者执行。其他中间件)



过滤你所需要的回购协议
repos=watcher.get所有回购协议(filter=filter=filter=func)




``` python
获取提交列表
ctx.repo.commit\u list()

#访问您的github用户名org name
ctx.repo.repo.login
ctx.repo.repo.repo.repo.repo.repo.file


;创建文件
ctx.repo.repo.file.repo.repo.file更新文件

获取文件
ctx.repo.file.repo.file_get()
;创建分支

ctx.repo.repo.repo.branch.repo.branch.repo.branch



ctx.repo.pr_create()
```

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

推荐PyPI第三方库


热门话题
JavaSpringbean已创建但未自动连接   java LibGDX游戏在三星Galaxy Grand Prime上结束   如何在Java中列出字符串句子中所有匹配条件的单词   java在Recyclerview中使用“putExtra”传递数据   java从一个特定的数组中提取特定的JSON对象,以便在Android中通过一个意图放入另一个活动   java需要使用IntelliJ和设置项目SDK的帮助   java springcontextindexer和Swagger 3   java使用indexOf和substring计算数字   java使用xml解析在word文档中查找隐式分页符   在添加<context:componentscan basepackage=“com.young.user”/   java无条件更改JTable单元格的背景色   选择列表中的java调用oracle函数:节点无数据类型   java如何添加缓冲图像作为JFrame的背景,然后在此图像上添加面板?   java Javadoc找不到用scala编写的类   java连接到文件共享程序的IP地址   java将数组元素加载到集合中   Tomcat中的java servlet、过滤器和线程   非Bean对象中的java EJB CDI注入?   java与println和printf的不同舍入