Auto update mr widget when new commits are pushed
What does this MR do?
Issue: #31236 (closed)
When new commits are pushed, there is a warning that the page needs to be refreshed. Instead, it will allow the user to merge with a warning.
Testing Case
- Create a new Merge Request
- Clone that branch that you created the merge request from
- Push up a new commit by making some changes to that branch
- Wait a few seconds, and you will see this loading message
- Keep waiting and you will get the updated merge-ability status
-
There is a refresh message: New changes were added. Reload the page to review them
- Make sure NOT to refresh the page, and click on the link
Reload the page to review them
-
This will go to the changes the tab and refreshes the page (so the warning message will be one)
- Now repeat step 3-5 and this time click on the "Merge" button
-
It will merge
FYI: Testing it locally
@andr3 showed me a very cool way to test this 🤩 Create a public project and clone it via HTTP. Now you can proceed as you would by creating a new MR and pushing up new commits.
GitLab Runner > You may or may not required this https://gitlab.com/gitlab-org/gitlab-development-kit/blob/master/doc/howto/runner.md I have this installed. But I believe you might not need this to test this feature. So I'm just including this as a fyi
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
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
Closes #31236 (closed)