当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Git SSH bad permissions
- 2020-08-19: what mechanism does TCP ensure reliability?
- 谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
- PHP后门隐藏技巧
- Configuration of AP hotspot on xunwei-imx6ull development board
- 甘特图对活动进行分组教程
- QT audio and video development 46 video transmission UDP version
- .NETCore3.1+Vue.js打造的低代码工作流引擎
- 2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?
- Application layer software development Godfather teaches you how to refactor, senior programmers must professional skills
猜你喜欢

Jenkins installation and deployment process

VARCHART XGantt入门教程

Introduction to Jenkins (2) declarative pipeline

How to add modules to nginx image?

STM32F030K6T6兼容替换灵动MM32F031K6T6

What are the highlights of Huawei mate 40 series with HMS?

Mobile pixel adaptation scheme

2020-08-29: process thread differences, in addition to the inclusion relationship, the underlying details?

Es create a new index database and copy the old index library, practice pro test effective!

Points to be considered when deleting mapping field of index in ES
随机推荐
磁存储芯片STT-MRAM的特点
VARCHART XGantt如何在日历上表示工作日
Unexpected element.. required element
Composition of MRAM cache
高速公路二维码定位报警系统
ado.net and asp.net The relationship between
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
How to use Gantt chart layers and filters
南京标识标牌设计制作,导视VI系统设计
Message queue - Analysis
Big data processing black Technology: revealing the parallel computing technology of Pb level data warehouse gaussdb (DWS)
How to start the hidden preferences in coda 2 on the terminal?
谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
What grammar is it? ]
Gantt chart grouping activities tutorial
QT audio and video development 46 video transmission UDP version
Two dimensional code location and alarm system of Expressway
Win7 AppCrash (solution)
Zhou Jie: database system of East China Normal University
2020-08-19: what mechanism does TCP ensure reliability?