Skip to content

Auto update mr widget when new commits are pushed

Samantha Ming requested to merge 31236-auto-update-merge-widget into master

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

  1. Create a new Merge Request
  2. Clone that branch that you created the merge request from
  3. Push up a new commit by making some changes to that branch
  4. Wait a few seconds, and you will see this loading message

image

  1. Keep waiting and you will get the updated merge-ability status

image

  • There is a refresh message: New changes were added. Reload the page to review them
  1. 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)
  1. 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.

image

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

Availability 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

Closes #31236 (closed)

Edited by 🤖 GitLab Bot 🤖

Merge request reports