google / triage-party

🎉 Triage Party: massively multi-player GitHub triage 🎉
Apache License 2.0
502 stars 80 forks source link

FR: Scope repos to collections #262

Closed eddiezane closed 2 years ago

eddiezane commented 3 years ago

I'm (finally) starting to build out the rules for sig-cli.

We're looking to have one Triage Party instance with a collection per repository we maintain.

Currently to accomplish this we need to a rule per collection/repo resulting in nearly identical rules.

collections:
  - id: kubectl
    name: Kubectl Triage
    rules:
      - new-kubectl-issue-needs-triage
  - id: kubernetes-daily
    name: Kubernetes Triage
    rules:
      - new-kubernetes-issue-needs-triage

rules:
  new-kubectl-issue-needs-triage:
    name: "New Kubectl issues that need triage"
    resolution: "Apply a triage label"
    type: issue
    repos:
      - https://github.com/kubernetes/kubectl
    filters:
      - label: "needs-triage"
      - label: "sig/cli"
      - created: -7d
  new-kubernetes-issue-needs-triage:
    name: "New Kubernetes issues that need triage"
    resolution: "Apply a triage label"
    type: issue
    repos:
      - https://github.com/kubernetes/kubernetes
    filters:
      - label: "needs-triage"
      - label: "sig/cli"
      - created: -7d

I'd like to have a single rule and then scope each collection to a repo.

collections:
  - id: kubectl
    name: Kubectl Triage
    repos:
      - https://github.com/kubernetes/kubectl
    rules:
      - new-issue-needs-triage
  - id: kubernetes-daily
    name: Kubernetes Triage
    repos:
      - https://github.com/kubernetes/kubernetes
    rules:
      - new-issue-needs-triage

rules:
  new-issue-needs-triage:
    name: "New issues that need triage"
    resolution: "Apply a triage label"
    type: issue
    filters:
      - label: "needs-triage"
      - label: "sig/cli"
      - created: -7d

I can take a stab at implementing this if you think it makes sense.

eddiezane commented 3 years ago

Opened https://github.com/google/triage-party/pull/263 as a rough implementation.

tstromberg commented 3 years ago

This brings to mind the possible need for an extra layer of abstraction -- where one can drill down between projects. I'll have to give this some thought.