Name status checks consistently to support GitHub-integrated CI workflow
Problem to solve
There is a flaw in the design of the GitLab CI for GitHub feature: GitLab CI creates status checks on the GitHub side, namespaced by branch. GitHub Status Checks can only be marked as "required" one by one based on their name. By putting branch name in the Status Check, you make it impossible to require the Status Check created by GitLab CI to pass, for all branches. This breaks the typical "require CI to pass before merge" workflow.
Steps to reproduce
Follow the standard instructions here,
- (Linked from marketing materials, https://about.gitlab.com/features/github/ )
I have seen this with a project that followed the main instructions at the top, as well as a project that was set up with "manual."
What is the expected correct behavior?
GitHub Status Check should have a consistent name like "ci/gitlab." Some users might want this to be configurable, I only care that it is possible to make it consistent.
It is easy to imagine another text field in the GitHub Integration panel, on GitLab. Its current behavior that includes branch name could be default if the field is left empty. If the field is filled out, it can hardcode to that. (Maybe other users would want ability to use variables there, but for the main GitHub use case, consistency/hardcode seems ideal.)
For users who want to check the overall status of the pipeline, they can use a new checkbox:
- Non-ticked: current behavior:
- Ticked: new behavior:
You can switch checkbox to use the different behaviors. It offers minimal configurability, and does not break existing behavior. Since this checkbox is only relevant to the GitHub integration, it should be in the GitHub integration settings. For new GH integrations, it should be enabled by default, but existing behavior for current users should not be changed at this time.
Let this option only appear in
/services/github/editbut for new GH integrations, this checkbox is activated by default
Static status check names
GitHub status checks need static name in order to be marked as "required"
What does success look like, and how can we measure that?
It is possible for a user to creates status checks on the GitHub side that can be marked as "required" without having to configure this one by one based on their name.