Skip to content

CI: Improve "Regenerate stale policies" job

Peter Leitzen requested to merge pl-ci-regenerate-policy-tweaks into master

What does this MR do and why?

This MR tweaks the regenarate-policies CI job:

  • Skip MR creation if branch already exists
  • Force pushes changes to an existing MR/branch
  • Switch to existing remote branch (pending MR
  • Only create a new one if it's missing
  • Add bot-authored label
  • Extract texts into envvars to cleanup code

How to verify on CI

Manual CI job on MRs
Screenshot_from_2024-04-11_12-00-22

Expected impact & dry-runs

These are strongly recommended to assist reviewers and reduce the time to merge your change.

See https://gitlab.com/gitlab-org/quality/triage-ops/-/tree/master/doc/scheduled#testing-policies-with-a-dry-run on how to perform dry-runs for new policies.

See https://gitlab.com/gitlab-org/quality/triage-ops/-/blob/master/doc/reactive/best_practices.md#use-the-sandbox-to-test-new-processors on how to make sure a new processor can be tested.

Action items

Edited by Peter Leitzen

Merge request reports