当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 2020-08-15: under what circumstances should data tasks be optimized?
- Test the necessary skill points of siege lion! This article takes you to interpret the testing technology under Devops
- JVM memory allocation - xms128m - xmx512m - XX: permsize = 128M - XX: maxpermsize = 512M
- Message queue - Analysis
- 插件Bilibili新版0.5.5
- Points to be considered when deleting mapping field of index in ES
- Benefits and functions of auto maintenance app development
- Jenkins installation and deployment process
- What are the highlights of Huawei mate 40 series with HMS?
- Common mathematical basic formulas of recursive and backtracking algorithms
猜你喜欢
#JVM 类加载机制
Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
Configuration of AP hotspot on xunwei-imx6ull development board
[doodling the footprints of Internet of things] Introduction to Internet of things
Exclusive interview of guests at | 2020 PostgreSQL Asia Conference: Wang Tao
[elastic search engine]
2020年新规,微信封号怎么快速解除?
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
How to deploy Gantt chart quickly and correctly
Cloudquery v1.2.0 release
随机推荐
20 XR projects roadshows, nearly 20 capital institutions attended! We sincerely invite you to attend the 2020 qcomm XR eco Partner Conference
Git remote library rollback specified version
ado.net and asp.net The relationship between
Count the number of project code lines
.NETCore3.1+Vue.js打造的低代码工作流引擎
小熊派开发板实践:智慧路灯沙箱实验之真实设备接入
PHP backdoor hiding skills
JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
Design of NAND flash interface control
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
How does varhart xgantt represent working days on a calendar
Js数组-数组的用法全在这里(数组方法的重构、数组的遍历、数组的去重,数组的判断与转换)
小程序商城系统插件代码该如何写?怎么用代码检查添加插件是否成功?
How to add modules to nginx image?
Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
Message queue - Analysis
2020-08-15: under what circumstances should data tasks be optimized?
轻量型 GPU 应用首选 京东智联云推出 NVIDIA vGPU 实例
2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?