当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
- Web API interface design: swaggerui document / unified response format / unified exception handling / unified authority verification
- Google browser realizes video playback acceleration function
- The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
- Erd-online free online database modeling tool
- About Devops seven misunderstandings, 99% of people have been hit!
- 2020 database technology conference helps technology upgrade
- The Interpreter pattern of behavior pattern
- 超高频RFID医疗血液管理系统应用
- The method of local search port number occupation in Windows system
猜你喜欢
关于DevOps的七大误解,99%的人都曾中过招!
The memorandum model of behavior model
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
Points to be considered when deleting mapping field of index in ES
Introduction to Huawei cloud micro certification examination
How to optimize the decoding performance of dynamsoft barcode reader
2020年新规,微信封号怎么快速解除?
How to manage the authority of database account?
vue3 新特性
List to map (split the list according to the key, and the value of the same key is a list)
随机推荐
STM32F030C6T6兼容替换MM32SPIN05PF
Nonvolatile MRAM memory used in all levels of cache
[doodling the footprints of Internet of things] Introduction to Internet of things
Markdown tricks
Configuration of AP hotspot on xunwei-imx6ull development board
2020-08-15: under what circumstances should data tasks be optimized?
Code generator plug-in and creator preform file analysis
PHP后门隐藏技巧
关于DevOps的七大误解,99%的人都曾中过招!
List to map (split the list according to the key, and the value of the same key is a list)
September 3, 2020: naked writing algorithm: loop matrix traversal.
Detect certificate expiration script
The essence of transaction and the principle of deadlock
Novice guidance and event management system in game development
三步轻松理解Kerberos协议
Method of code refactoring -- Analysis of method refactoring
8.Swarm创建维护和水平扩展Service
南京标识标牌设计制作,导视VI系统设计
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
image operating system windows cannot be used on this platform