Skip to content

Unable to remove previous added previously merged commits from an MR

Summary

In !107502 (merged), there's a previously merged commit that apparently cannot be removed:

simplescreenrecorder-2022-12-21_12.41.05

It's possible this is an edge case, as the source repository is a fork. Though, I'm a maintainer on the target project and a developer on the source, so I'm not sure if that's relevant.

Steps to reproduce

Ideally, the 403 Forbidden above could be investigated in production. I've not yet attempted to reproduce this locally.

Example Merge Request

!107502 (merged)

What is the current bug behavior?

I get a 403 Forbidden when trying to remove the previously added commit.

What is the expected correct behavior?

I should be able to remove previously merged commits, that I myself added.

Relevant logs and/or screenshots

simplescreenrecorder-2022-12-21_12.41.05

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of:
`sudo gitlab-rake gitlab:env:info`)

(For installations from source run and paste the output of:
`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes