Skip to content

Simplify internal post receive messages

What does this MR do?

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.

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.

Resolves https://gitlab.com/gitlab-org/gitlab-ce/issues/59808

Does this MR meet the acceptance criteria?

TODO

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team
Edited by Grzegorz Bizon

Merge request reports