Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gitlab): remove approval rules only if automerging #31720

Closed

Conversation

rarkins
Copy link
Collaborator

@rarkins rarkins commented Oct 1, 2024

Fixes #31354

Move the logic for ignoring approvals from the tryPrAutomerge function into the createPr function.

  • Update the createPr function to call ignoreApprovals only for merge requests with automerge enabled.
  • Add tests in lib/config/migrate-validate.spec.ts to verify that approval rules are not removed for merge requests without automerge enabled.
  • Add tests in lib/config/presets/gitlab/index.spec.ts to verify that approval rules are removed for merge requests with automerge enabled and not removed for merge requests without automerge enabled.

For more details, open the Copilot Workspace session.

Fixes #31354

Move the logic for ignoring approvals from the `tryPrAutomerge` function into the `createPr` function.

* Update the `createPr` function to call `ignoreApprovals` only for merge requests with `automerge` enabled.
* Add tests in `lib/config/migrate-validate.spec.ts` to verify that approval rules are not removed for merge requests without `automerge` enabled.
* Add tests in `lib/config/presets/gitlab/index.spec.ts` to verify that approval rules are removed for merge requests with `automerge` enabled and not removed for merge requests without `automerge` enabled.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/renovatebot/renovate/issues/31354?shareId=XXXX-XXXX-XXXX-XXXX).
@rarkins rarkins closed this Oct 1, 2024
@rarkins rarkins deleted the rarkins/fix/31354-gitlab-approval-rules-no-automerge branch October 2, 2024 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Renovate removes GitLab approval rules independently of automerge option
1 participant