Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 520
Jonathon Reinhart Avatar asked Jun 22 '15 14:06

Jonathon Reinhart


People also ask

How do I mark a repository as deprecated in github?

Edit the title of the README.Remove the current title, and instead write # DEPRECATED . Add a reason to the README, at the top, stating that: “This is no longer supported, please consider using XXX instead.” If there is a reason for deprecating the repository, add it here.

What is a repository hook?

Git hooks are scripts that run automatically every time a particular event occurs in a Git repository. They let you customize Git's internal behavior and trigger customizable actions at key points in the development life cycle.


1 Answers

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.
like image 120
Kirill Avatar answered Oct 13 '22 04:10

Kirill