惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
V
Visual Studio Blog
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
C
Check Point Blog
D
Docker
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
博客园 - 叶小钗
博客园 - 聂微东
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
WordPress大学
WordPress大学
Engineering at Meta
Engineering at Meta
腾讯CDC
S
SegmentFault 最新的问题
博客园 - 【当耐特】

二丫讲梵

学习周刊-总第258期-2026年第15周 学习周刊-总第257期-2026年第14周 学习周刊-总第256期-2026年第13周 学习周刊-总第255期-2026年第12周 学习周刊-总第254期-2026年第11周 学习周刊-总第253期-2026年第10周 临时插播一条羊毛,免费领取450元大模型API代金券 学习周刊-总第252期-2026年第09周 学习周刊-总第251期-2026年第08周 学习周刊-总第250期-2026年第07周 学习周刊-总第249期-2026年第06周 诚邀评论,聊聊你所知欲知的我 学习周刊-总第248期-2026年第05周 我的QQ动态之2015年 我的QQ动态之2014年 我的QQ动态之2013年 我的QQ动态之2012年 我的QQ动态-2010-2011年 我的QQ动态-创栏小叙 学习周刊-总第247期-2026年第04周 Nexus社区版权益阉割--一文告诉你有哪些版本可以选择 学习周刊-总第246期-2026年第03周 学习周刊-总第245期-2026年第02周 学习周刊-总第244期-2026年第01周 学习周刊-总第243期-2025年第52周 学习周刊-总第242期-2025年第51周 开源项目ZenOps:带你领略禅意运维 学习周刊-总第241期-2025年第50周 用京东金融,享负债人生 学习周刊-总第240期-2025年第49周
开源一个工具-使用关键字搜索所有gitlab项目
二丫讲梵 · 2023-09-08 · via 二丫讲梵

# 项目

- name: gitlabCodeSearch
  desc: 使用关键字搜索所有gitlab项目,并将结果输出为Excel
  avatar: https://avatars2.githubusercontent.com/u/416130?s=460&u=8753e86600e300a9811cdc539aa158deec2e2724&v=4 # 可选
  link: https://github.com/eryajf/gitlabCodeSearch # 可选
  bgColor: "#0074ff" # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号
  textColor: "#fff" # 可选,默认var(--textColor)

1
2
3
4
5
6

日常工作中,我们在做一些变更的时候,经常会遇到对 gitlab 所有项目检索某个关键字的需求,这个工具,正是为解决这一需求而生的。

# 如何使用

先创建 gitlab 的 token,这一步就不介绍如何创建了。注意此 token 需要给:api 和 read_api 两个权限。

然后你可以通过配置文件,或者环境变量的方式将配置加载到程序当中。

通过环境变量能够快速运行项目,因此这里强烈推荐你使用此方式:

如果你熟悉 go 语言,则可以自己编译二进制,如果不熟悉,也可以直接在 releases 当中下载已经编译好的二进制。

gcs search -u 'https://gitlab.xxx.com' -t 'xxxxxxxxxxx' -w '测试'

1

效果如下:

运行成功以后,会自动在项目运行目录下将结果输出为 Excel。

你也可以直接通过 docker 来运行:

docker run -it registry.cn-hangzhou.aliyuncs.com/eryajf/gcs gcs search -u 'https://gitlab.xxx.com' -t 'xxxxxxxxxxx' -w '测试'

1