/eisenhower

Eisenhower is a GitHub action that adds Eisenhower matrix priority labels to issues based on the content of the issue.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Eisenhower: Assign issue priority labels based on issue content

Eisenhower is a GitHub action that adds Eisenhower matrix priority labels to issues based on the content of the issue.

What it does

Eisenhower will take the following steps,

  • Look through all issues
  • Search for required string
  • Assign label based on string found.

IF

Impact

High

Urgency

Now

THEN assign label P1

IF

Impact

High

Urgency

Later

THEN assign label P2

IF

Impact

Low

Urgency

Now

THEN assign label P3

IF

Impact

Low

Urgency

Later

THEN assign label P4

Requirements

Issue templates

In your repo/.github/ISSUE_TEMPLATE directory, ensure that your issue templates include the following.

body:
  - type: dropdown
    id: impact
    attributes:
      label: Impact
      description: How important is this?
      options:
        - High
        - Low
    validations:
      required: true
  - type: dropdown
    id: urgency
    attributes:
      label: Urgency
      description: Should this be fixed now or can it be done later?
      options:
        - Now
        - Later
    validations:
      required: true

This ensures that all subsequent issues will have the strings that we need to search for.

Any issues that do not feature the Impact and Urgency sections will be assigned the label P? and have the following appended to the issue body.

Impact

?

Urgency

?

As GitHub actions currently offers no cranial data integration, you will need to go back through these issues and complete those sections so that the correct Eisenhower labels can be assigned.

If you manually assign a Px label to an issue, Eisenhower will remove it and replace it with the correct label, as defined by the issue body.

Labels

If your repo does not already have Px labels, Eisenhower will create them.

Vars

  • GH_ACCESS_TOKEN
  • GH_REPOSITORY and GH_ISSUE_NUMBER are provided by the GitHub context, but do still need to be included.
  • .env(.example)
    • This is for local development only.

Inputs

Eisenhower takes no inputs.

Workflow

Copypasta this to [repo]/.github/workflows/eisenhower.yml

name: Eisenhower
on:
  issues:
    types: [opened, reopened, edited]
env:
  GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
  GH_REPOSITORY: ${{ github.repository }}
  GH_ISSUE_NUMBER: ${{ github.event.issue.number }}    
jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - name: Prioritize issue with Geek.Zone Eisenhower
      uses: GeekZoneHQ/eisenhower@main

Thanks

Big thanks to,