当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- In 2020, how can wechat seal numbers be quickly lifted?
- 20个XR项目路演,近20个资本机构出席!诚邀您参加2020 Qualcomm XR生态合作伙伴大会
- win7 APPCRASH(解决方法)(转)
- Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
- 2020 database technology conference helps technology upgrade
- 应用层软件开发教父教你如何重构,资深程序员必备专业技能
- Zhou Jie: database system of East China Normal University
- Benefits and functions of auto maintenance app development
- VARCHART XGantt入门教程
- 三步轻松理解Kerberos协议
猜你喜欢

Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment

Common mathematical basic formulas of recursive and backtracking algorithms

轻量型 GPU 应用首选 京东智联云推出 NVIDIA vGPU 实例

实验一

Js字符串-String字符串对象方法

JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)

应用层软件开发教父教你如何重构,资深程序员必备专业技能

JVM class loading mechanism

1万辆!理想汽车召回全部缺陷车:已发生事故97起,亏损将扩大

Utility class functions (continuous update)
随机推荐
谈了多年的数字化转型,为什么还有很多企业依然“口头管理”
JS array the usage of array is all here (array method reconstruction, array traversal, array de duplication, array judgment and conversion)
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
Nodejs中使用jsonwebtoken(JWT)生成token的场景使用
Interviewer: how about shardingsphere
Common syntax corresponding table of mongodb and SQL
image operating system windows cannot be used on this platform
September 9, 2020: naked writing algorithm: two threads print numbers 1-100 in turn.
南京标识标牌设计制作,导视VI系统设计
ImageMagick - add watermark
实验一
python3操作Jenkins模块api
Git SSH bad permissions
Detailed software engineering -- the necessary graphs in each stage
Test the necessary skill points of siege lion! This article takes you to interpret the testing technology under Devops
Introduction to Jenkins (2) declarative pipeline
Ora-02292: complete constraint violation (midbjdev2.sys_ C0020757) - subrecord found
confd
The method of local search port number occupation in Windows system
关于DevOps的七大误解,99%的人都曾中过招!