项目作者: Xunnamius

项目描述 :
A tool to fix some issues with GitLab's handling of global admin labels
高级语言: JavaScript
项目地址: git://github.com/Xunnamius/gitlab-fix-labels.git
创建时间: 2020-05-06T11:55:50Z
项目社区:https://github.com/Xunnamius/gitlab-fix-labels

开源协议:

下载


![Black Lives Matter!][badge-blm]
![!!UNMAINTAINED!!][badge-unmaintained]

⛔️ DEPRECATED/UNMAINTAINED

[!CAUTION]

This old thing served its purpose dutifully and without complaint, but the
time where it was useful has long since passed. GitLab has better label
support these days… plus I switched to GitHub 🙃

This tool will help propagate into the repos of your choice those nice shiny new
GitLab global admin labels you worked so hard on. See
below.

This was built to address
these issues with
GitLab.

Installation

  1. npm install -g gitlab-fix-labels

Usage

General command syntax:

  1. gitlab-fix-labels GITLAB_API_STARTPOINT_URI YOUR_AUTH_TOKEN YOUR_ACTION YOUR_TARGET

Possible actions:

add - add your admin labels to your target repo(s); existing labels will not
be touched; any duplicates will be skipped.

delete - completely and utterly delete all of a repository’s labels.

replace - the same as calling delete followed by add.

Your target:

The target must either be the string all (case sensitive) or an integer larger
than 0.

Examples

  1. gitlab-fix-labels https://git.mysite.org/api/v4 myspecial_tokenhere add 10
  2. gitlab-fix-labels https://newgitlab.com/api/v5 my2ndspecial_tokenhere delete all
  3. gitlab-fix-labels http://git.lol/api/v4/ myotherspecial_tokenhere replace all
  4. gitlab-fix-labels http://git.lol/api/v5/ special_token2 replace 555

To completely replace the labels on one project with your custom admin global
defaults (set in the administrator area of GitLab):

  1. gitlab-fix-labels GITLAB_API_STARTPOINT_URI YOUR_AUTH_TOKEN replace YOUR_TARGET

To completely replace the labels on ALL projects with your global admin
defaults:

  1. gitlab-fix-labels GITLAB_API_STARTPOINT_URI YOUR_AUTH_TOKEN replace all

To append your global admin defaults to ALL projects (not deleting existing
labels):

  1. gitlab-fix-labels GITLAB_API_STARTPOINT_URI YOUR_AUTH_TOKEN add all

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style.

Lint and test your code!

Release History

  • 0.1.x Rapid iteration; initial working release
  • 0.1.4 Implement #1, added action interface to CLI; fixed a few minor bugs
  • 0.2.1 Added new commands, changed interface, added more helpful help text
  • 0.2.2 Fixed per_page bug
  • 0.2.3 Minor changes

[badge-blm]: https://xunn.at/badge-blm ‘Join the movement!’

[badge-unmaintained]:
https://xunn.at/badge-unmaintained
‘Unfortunately, this project is unmaintained (forks welcome!)’