当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Cloudquery v1.2.0 release
- [learning] interface test case writing and testing concerns
- Plug in bilibilibili new version 0.5.5
- NAND FLASH的接口控制设计
- 2020-08-20: the difference between go and python?
- Code generator plug-in and creator preform file analysis
- The method of local search port number occupation in Windows system
- 关于DevOps的七大误解,99%的人都曾中过招!
- 8.Swarm创建维护和水平扩展Service
- 10000! Ideal car recalls all defective cars: 97 accidents have occurred and losses will be expanded
猜你喜欢

Points to be considered when deleting mapping field of index in ES

如何创建交互式内核密度图表

The use of Xunwei imx6 development board device tree kernel menuconfig

Characteristics of magnetic memory chip STT-MRAM

Detect certificate expiration script

Stm32f030k6t6 compatible replacement smart mm32f031k6t6

大佬们如何在nginx镜像里面增加模块?

Google browser realizes video playback acceleration function

A good thing for working people -- to temper the will of iron and steel requires such an efficient computer

idea 激活到 2089 失效
随机推荐
8. Swarm creates maintenance and horizontal extension service
移动端像素适配方案
[doodling the footprints of Internet of things] Introduction to Internet of things
应用层软件开发教父教你如何重构,资深程序员必备专业技能
ImageMagick - 添加水印
Two dimensional code location and alarm system of Expressway
How does varhart xgantt represent working days on a calendar
#JVM 类加载机制
image operating system windows cannot be used on this platform
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.
实验一
高速公路二维码定位报警系统
超高频RFID医疗血液管理系统应用
Detailed software engineering -- the necessary graphs in each stage
Reserved battery interface, built-in charge and discharge circuit and electricity meter, quickly help easily handle hand-held applications
List to map (split the list according to the key, and the value of the same key is a list)
甘特图对活动进行分组教程
August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)
Summary of common SQL statements