当前位置:网站首页>Python3 operating gitlab
Python3 operating gitlab
2020-11-06 22:38:00 【Leaf blade】
#coding=utf-8
import base64
# Import python-gitlab library
import gitlab
url = 'http://192.168.x.xxx'
token = 'D98-t7HJpXxwhq8qbXcJ'
# Sign in
gl = gitlab.Gitlab(url, token)
# Get the project
project = gl.projects.get('ZEP-BACKEND/ZEP-BACKEND-JAVA')
# obtain javademo/config Directory file list , Version is master
items = project.repository_tree(path='javademo', ref='master')
def get_all_files(path=None, ref='master'):
items = project.repository_tree(path=path, ref=ref)
for item in items:
if item['mode'] == '040000':
# Call recursion , Achieve directory recursive output
get_all_files(item['path'], ref)
if item['mode'] == '100644':
print("===({})===".format(item['path']))
get_all_files(path='javademo', ref='master')
版权声明
本文为[Leaf blade]所创,转载请带上原文链接,感谢
边栏推荐
- Countdown | 2020 PostgreSQL Asia Conference - agenda arrangement of Chinese sub Forum
- ImageMagick - 添加水印
- 1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
- #JVM 类加载机制
- Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
- About Devops seven misunderstandings, 99% of people have been hit!
- 大佬们如何在nginx镜像里面增加模块?
- Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
- New features of vue3
- Git SSH bad permissions
猜你喜欢
Stm32f030f4p6 compatible with smart micro mm32f031f4p6
实验一
Mobile pixel adaptation scheme
2020-08-19: what mechanism does TCP ensure reliability?
消防器材RFID固定资产管理系统
Design of NAND flash interface control
Plug in bilibilibili new version 0.5.5
Message queue - Analysis
Dynamsoft barcode reader v7.5!
20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
随机推荐
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
甘特图对活动进行分组教程
Code generator plug-in and creator preform file analysis
Two dimensional code location and alarm system of Expressway
三步轻松理解Kerberos协议
Configuration of AP hotspot on xunwei-imx6ull development board
Markdown tricks
How to manage the authority of database account?
confd
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
Three steps to understand Kerberos Protocol easily
如何才能快速正确的部署甘特图
Nanjing logo design and production, guide VI system design
南京标识标牌设计制作,导视VI系统设计
Detailed software engineering -- the necessary graphs in each stage
python3操作Jenkins模块api
How to optimize the decoding performance of dynamsoft barcode reader
How to use Gantt chart layers and filters
Detect certificate expiration script
September 3, 2020: naked writing algorithm: loop matrix traversal.