[go: up one dir, main page]

Skip to content

System note should be created when a push moves an MR's branch backwards

We add system notes to MRs when you push new commits. However, we seem to miss the case where your push doesn't add any new commits to the MR, but only removes some.

For example, gitlab-com/www-gitlab-com!17563 (merged) had this sequence happen:

  1. Push to set HEAD to gitlab-com/www-gitlab-com@b33f67f6 (gitlab-com/www-gitlab-com!17563 (comment 127755384)).
  2. Push to set HEAD to gitlab-com/www-gitlab-com@68b7ea17 (gitlab-com/www-gitlab-com!17563 (comment 127774609)).
  3. Push to set HEAD back to gitlab-com/www-gitlab-com@b33f67f6; that is, removing gitlab-com/www-gitlab-com@68b7ea17 entirely. This did not have a system note.

That's unexpected because otherwise the MR does update: there is a new version in the version selector, the diffs and commits update, etc. But there is no note of this in the MR's system notes, although there is in the project's activity log.

Proposal

Add a system note saying that the branch was reset from commit X to Y, and link to the comparison.

Links / references

Edited by 🤖 GitLab Bot 🤖