简体   繁体   English

Git挂钩指示存储库已弃用

[英]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. 我们有一个存储库(托管在GitLab实例上),其中一些项目仍然引用,但已被弃用以支持另一种解决方案。

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. 理想情况下,每次从此存储库获取 (作为git submodule update )都会导致在获取期间打印一条巨型消息。 I was expecting to add a simple Git hook that would print this deprecated message. 我本来希望添加一个简单的Git钩子来打印这个已弃用的消息。 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中看不到任何可以实现此功能的内容。

Gitlab has feature called "Broadcast messages" since 6.3 . 自6.3以来, Gitlab具有称为“广播消息”的功能。 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 . 但是, 从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. 制作明亮可见的广播消息,告知Gitlab的这个实例已被弃用,并且每个人都应该使用其他东西,因为在第X天写入访问将被关闭。
  • At day X make everyone read-only. 在第X天,每个人都只读。
  • Leave this instance of Gitlab so old links won't be broke and so on. 保留这个Gitlab实例,这样旧的链接就不会破坏等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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