jin / bazel-triage-party

Repository from Github https://github.comjin/bazel-triage-partyRepository from Github https://github.comjin/bazel-triage-party

Triage Party 🎉

NOTE: This is not an officially supported Google product

Triage Party is a tool for triaging incoming GitHub issues for large open-source projects, built with the GitHub API.

screenshot

Triage Party focuses on reducing response latency for incoming GitHub issues and PR's, and ensure that conversations are not lost in the ether. It was built from the Google Container DevEx team's experience contributing to popular open-source projects, such as minikube, Skaffold, and Kaniko.

Triage Party is a stateless Go web application, configured via YAML. While it has been optimized for Google Cloud Run deployments, it's deployable anywhere due to its low memory footprint: even on a Raspberry Pi.

Features

  • Queries that are not possible on GitHub:
    • conversation state (tag: recv, tag: send)
    • how long since a project member responded (responded: +15d)
    • duration (updated: +30d)
    • regexp (label: priority/.*)
    • reactions (reactions: >=5)
    • comment popularity (comments-per-month: >0.9)
    • ... and more!
  • Multi-player mode: Supports up to 20 simultaneous players in group triage
  • Easily open groups of issues into browser tabs (must allow pop-ups)
  • Queries across multiple repositories
  • "Shift-Reload" for live data pull

Requirements

Triage Party in production

See these fine examples:

Try it locally

See what Triage Party would look like for an arbitrary repository:

go run cmd/server/main.go \
  --github-token-file=<path to a github token> \
  --config examples/generic-kubernetes.yaml \
  --repos kubernetes/sig-release

Then visit http://localhost:8080/

The first time you run Triage Party against a new repository, there will be a long delay as it will download data from GitHub. This data will be cached for subsequent runs. We're working to improve this latency.

Configuration

Each page is configured with a collection that references multiple queries (rules). These rules can be shared across pages:

collections:
  - id: soup
    name: I like soup!
    rules:
      - discuss
      - many-reactions

rules:
  discuss:
    name: "Items for discussion"
    resolution: "Discuss and remove label"
    filters:
      - label: triage/discuss
      - state: "all"

  many-reactions:
    name: "many reactions, low priority, no recent comment"
    resolution: "Bump the priority, add a comment"
    filters:
      - reactions: ">3"
      - reactions-per-month: ">1"
      - label: "!priority/p0"
      - label: "!priority/p1"
      - responded: +60d

For example configurations, see examples/*.yaml. There are two that are particularly useful to get started:

  • generic-project: uses label regular expressions that work for most GitHub projects
  • generic-kubernetes: for projects that use Kubernetes-style labels, particularly prioritization

Filter language

# issue state (default is "open")
- state:(open|closed|all)

# GitHub label
- label: [!]regex

# Issue or PR title
- title: [!]regex

# Internal tagging: particularly useful tags are:
# - recv: updated by author more recently than a project member
# - recv-q: updated by author with a question
# - send: updated by a project member more recently than the author
- tag: [!]regex

# GitHub milestone
- milestone: string

# Duration since item was created
- created: [-+]duration   # example: +30d
# Duration since item was updated
- updated: [-+]duration
# Duration since item was responded to by a project member
- responded: [-+]duration

# Number of reactions this item has received
- reactions: [><=]int  # example: +5
# Number of reactions per month on average
- reactions-per-month: [><=]float

# Number of comments this item has received
- comments: [><=]int
# Number of comments per month on average
- comments-per-month: [><=]int
# Number of comments this item has received while closed!
- comments-while-closed: [><=]int

# Number of commenters on this item
- commenters: [><=]int
# Number of commenters who have interactive with this item while closed
- commenters-while-closed: [><=]int
# Number of commenters tthis item has had per month on average
- commenters-per-month: [><=]float

Deploying Triage Party

Docker:

env DOCKER_BUILDKIT=1 \
  GITHUB_TOKEN_PATH=<path to your github token> \
  docker build --tag=tp \
  --build-arg CFG=examples/generic-project.yaml \
  --secret id=github,src=$GITHUB_TOKEN_PATH .

docker run -p 8080:8080 tp

Cloud Run:

See examples/minikube-deploy.sh

Kubernetes:

See examples/kubernetes-manifests

About

License:Apache License 2.0


Languages

Language:Go 91.3%Language:CSS 5.4%Language:Dockerfile 1.7%Language:Shell 1.6%