当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- To solve the problem that the data interface is not updated after WPF binding set
- Nanjing logo design and production, guide VI system design
- The Interpreter pattern of behavior pattern
- Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
- 轻量型 GPU 应用首选 京东智联云推出 NVIDIA vGPU 实例
- 插件Bilibili新版0.5.5
- Message queue - Analysis
- The use of Xunwei imx6 development board device tree kernel menuconfig
- Stm32f030c6t6 compatible to replace mm32spin05pf
- Three steps to understand Kerberos Protocol easily
猜你喜欢
Epu360: all the H5 templates you want are here, e-book, big turntable, red envelope rain, questionnaire survey
JS string - string string object method
Composition of MRAM cache
Configuration of AP hotspot on xunwei-imx6ull development board
Code generator plug-in and creator preform file analysis
The memorandum model of behavior model
Gantt chart grouping activities tutorial
Exclusive interview with Alibaba cloud database for 2020 PostgreSQL Asia Conference: Zeng Wenjing
Nonvolatile MRAM memory used in all levels of cache
In 2020, how can wechat seal numbers be quickly lifted?
随机推荐
Composition of MRAM cache
JS string - string string object method
FreeSWITCH视频会议“标准”解决方案
What are the highlights of Huawei mate 40 series with HMS?
插件Bilibili新版0.5.5
The essence of transaction and the principle of deadlock
How does LeadTools detect, read and write barcodes
confd
Design of NAND flash interface control
实验一
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
10000! Ideal car recalls all defective cars: 97 accidents have occurred and losses will be expanded
Novice guidance and event management system in game development
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
How to write plug-in code of small program mall system? How to use code to check whether the plug-in is successfully added?
2020-08-17: how to solve data skew in detail?
Git remote library rollback specified version
August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.
20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大