当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- The 4th China BIM (digital construction) manager Summit Forum will be held in Hangzhou in 2020
- Plug in bilibilibili new version 0.5.5
- Code generator plug-in and creator preform file analysis
- 插件Bilibili新版0.5.5
- 测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
- August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.
- What are the highlights of Huawei mate 40 series with HMS?
- The isolation level of transaction and its problems
- How to add modules to nginx image?
- 打工人好物——磨炼钢铁意志就要这样高效的电脑
猜你喜欢

Stm32f030k6t6 compatible replacement smart mm32f031k6t6

August 30, 2020: naked write algorithm: the nearest common ancestor of two nodes in a binary tree.

2020-08-17: how to solve data skew in detail?

In 2020, how can wechat seal numbers be quickly lifted?

关于DevOps的七大误解,99%的人都曾中过招!

Gantt chart grouping activities tutorial

JVM class loading mechanism

August 24, 2020: what are small documents? What's wrong with a lot of small files? How to solve many small files? (big data)

Plug in bilibilibili new version 0.5.5

The isolation level of transaction and its problems
随机推荐
Stm32f030c6t6 compatible to replace mm32spin05pf
Git SSH bad permissions
The first choice for lightweight GPU applications is the NVIDIA vgpu instance launched by Jingdong Zhilian cloud
STM32F030C6T6兼容替换MM32SPIN05PF
How to optimize the decoding performance of dynamsoft barcode reader
测试攻城狮必备技能点!一文带你解读DevOps下的测试技术
About Devops seven misunderstandings, 99% of people have been hit!
The isolation level of transaction and its problems
NAND FLASH的接口控制设计
2020年新规,微信封号怎么快速解除?
插件Bilibili新版0.5.5
Windows 10 Bluetooth management page 'add Bluetooth or other devices' option click no response solution
Qt音视频开发46-视频传输UDP版
Jenkins入门(二)声明式流水线Jenkins Pipeline
Git remote library rollback specified version
[elastic search engine]
August 14, 2020: what are the execution engines for data tasks?
1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大
Benefits and functions of auto maintenance app development
8.Swarm创建维护和水平扩展Service