简体   繁体   中英

Git hook to indicate repository is deprecated

We have a repository (hosted on a GitLab instance) which a handful of projects still reference, but has been deprecated in favor of another solution.

Is there any way to mark a repository as "deprecated"?

Ideally, every fetch from this repository (as part of a git submodule update ) would cause a giant message to be printed during the fetch. I was expecting to add a simple Git hook that would print this deprecated message. However, there doesn't seem to be a "run this on every fetch" hook.

Also, I see nothing in GitLab that would enable this.

Gitlab has feature called "Broadcast messages" since 6.3 . On the screenshot they shows message with the same color as header and many users could simply not notice it.

However, it is possible to choose color for these messages since 6.5 . For example, administrators at my work once made blue message and it was very hard not to notice the message.

So you may

  • Make bright and visible broadcast message telling that this instance of Gitlab is deprecated and that everyone should use something else because at day X write access will be closed.
  • At day X make everyone read-only.
  • Leave this instance of Gitlab so old links won't be broke and so on.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM