Disable merge button when status checks are required to pass and checks are failing or pending
Problem description
As described in the parent epic &8516 (closed) merge requests can be merged even if the status checks are pending or failed.
Proposal
In #369859 (closed) a new attribute will be added to the merge request cached data. The attribute will be true
when the setting is enabled and not all status checks are passing. When it is true the Merge
button should be disabled.
If #369859 (closed) has not yet been developed coordinate with the issue assignee on a contract to determine what the new attribute will look like. This can be mocked to develop the frontend while the backend is in development.
Note: Status checks that are pending
should also be considered a failure.
Show Merge blocked: status checks must pass
message.
Implementation plan
- When status checks are not passing and they are required to, then update the status checks widget description to include the following
merge request is blocked until all status checks have passed
. See #369861 (comment 1145168540) for desgins. - See if documentation needs to be updated.
- Update specs.
Old implementation plan
See #369861 (comment 1143977101) for context.
- Add a feature flag if one has not already been added in #369859 (closed).
- Add a new merge request state for status checks.
- Note: See !58658 (merged) as an example.
- Note: Status check results are currently fetched async in the widget extension. Ideally we can share the response with the MR state, and thus only request the data once.
- Note: We'll also need to set the
checking
status and display theMRWidgetChecking
widget while the status check results are busy fetching.
- Update specs.
- Update documentation.
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.