Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

🔎 使用关键字搜索所有gitlab项目

License

Notifications You must be signed in to change notification settings

eryajf/gitlabCodeSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitlabCodeSearch

Auth GitHub Pull Requests HitCount GitHub license

🌉 🔎 使用关键字搜索所有gitlab项目,并将结果输出为Excel 🌉

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

如何使用

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

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

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

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

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

效果如下:

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

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

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

如果你在使用过程中遇到问题,欢迎提交 issue。如果你还有其他需求,以及其他想法,欢迎提交 PR。

  • 🎉 2024年2月23日更新:
    • 现在支持指定多个关键字了,用法如下:gcs search -u 'https://gitlab.xxx.com' -t 'xxxxxxxxxxx' -w 'a,b,c'

感谢开源

此框架建立在如下几个优秀的开源项目之上:

Morty Proxy This is a proxified and sanitized view of the page, visit original site.