Skip to content

First pass for automated policies

Mark Fletcher requested to merge first-pass-policies into master

The plan is to automate the enforcement of our issue triage policies using scheduled pipelines.

The script will:

  • Retrieve all of a particular type of issuable for a given query
  • Apply some custom filters to the results locally
  • Filters that the API doesn't currently support
  • Post a comment to update each resulting issuable

For the first pass:

Aim to support conditions:

  • Query by label(s)
  • Query unlabelled
  • Query by updated_at date
  • Query by created_at date
  • Query by issuable state
  • Query by upvotes

Aim to support updates:

  • Commenting on an issuable
  • Relabelling an issuable
  • Mentioning users on an issuable
  • Changing issuable state

Pipeline will execute all rules once

  • Pipeline defined

Overall aims:

Policies to automate in first pass:

Mark stale issues for closure

Conditions
  • Label: unlabelled
  • updated_at: over 3 months
  • state: Open
Actions
  • Add a comment

  • Mention @markglenfletcher

  • Label: "awaiting feedback" "auto updated"

  • Complete?

Close non-updated issues

Conditions
  • Label: "awaiting feedback", "auto updated"
  • not updated for over 2 weeks
  • state: Open
Actions
  • Add a comment

  • Mention @markglenfletcher

  • Label: "auto closed"

  • State: Close issue

  • Complete?

Edited by Mark Fletcher

Merge request reports