For optional approvals, /approve
provides approval when Approve
button is unavailable
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
MRs in projects that have the setting to "prevent committers from approving" enabled hide the Approve button if you commit.
However, you can still successfully approve with the /approve
quick action.
Steps to reproduce
- Add a commit to an MR in a project that has the setting to "prevent committers from approving" enabled, for example
gitlab
. - (Maybe optional?) Refresh the page.
- Notice the Approve button disappeared.
- Enter
/approve
in a comment. Notice a success toast, and when you refresh, your avatar in approvals given.
Example Project
What is the current bug behavior?
What is the expected correct behavior?
When you're not allowed to approve, the quick action does nothing and gives a message to say this.
Relevant logs and/or screenshots
Output of checks
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
Edited by 🤖 GitLab Bot 🤖