Skip to content

Simplify internal post receive messages

GitLab outputs a variety of messages on Git push. This simplifies the way we generate those messages and output them to the user.

In this world, the Rails app's /internal/post_receive API endpoint returns messages in this form:

messages: [
  {
    type: :basic, 
    message: 'My message'  
  },
  {
    type: :alert, 
    message: 'My broadcast message'  
  },
  {
    type: :alert, 
    message: 'My warning'  
  }
]

And Gitaly outputs them in order. Alerts are treated the same way broadcast messages are treated today (with bars surrounding the content, etc).

This allows us to add new categories of messages without touching Gitaly. I am doing this now instead of adding a new category of message for https://gitlab.com/gitlab-org/gitlab-ee/issues/9195.

This is backwards-compatible, i.e. it does not require the GitLab-CE MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/31640. This way, Gitaly can be upgraded, and then the Rails app can be upgraded, without losing any post receive messages.

Edited by GitLab Release Tools Bot

Merge request reports