peckjon / taskeract

Automates templated issue ingestion, tagging, assignment, and board attachment
MIT License
1 stars 1 forks source link

A tesseract

Taskeract: automate task ingestion, issue creation, tagging, assignment, and project board connections

Taskeract helps your team quickly receive, tag, triage, and track issues.

This sample repo contains issue templates for three types of tasks ("generic", "blogpost", and "video"), but you are free to create your own task types and delete the samples. Note the fields for date, topic, product, region, stakeholders -- each of these will be used by the automation to create labels on your issues so you can easily search & filter them.

What the automation does

How to use this repo

  1. Copy all files from the .github folder into your own repository's .github folder (or fork this repo if starting fresh)

  2. In your repository, go to Settings > Actions > General and set "Workflow permissions" to "Read and write permissions". If this is too permissive, you can instead create a PAT under Secrets, and edit all tesseract-*.yml workflows to use that secret instead of `secrets.GITHUB_TOKEN``

  3. In your repository, create the following labels: TASK: generic,TASK: blogpost,TASK: video

    • pick any colors you prefer
    • if you have changed the issue templates, create the labels defined in their "labels:" array instead.
  4. Inside .github/workflows/taskeract-created.yml and taskeract-edited.yml, change REPOSITORY_NAME to be your new repository

  5. If you want to notify regional supervisors when new issues are created, add their handles to SUPERVISORS_BY_REGION inside .github/workflows/taskeract/utils.py

  6. Decide whether to use the Project Board automation available in this tool. While Project Boards provide a native mechanism for auto-adding issues to projects, Taskeract gives you a bit more control over which issues are added, and allows you to set field values as you do.

    • If you'll be using Taskeract's board automation:
      • create a secret in your repo called ADD_TO_PROJECT_PAT which contains a token capable of editing any project boards you'll be adding issues to (usually, a "classic"" token with "Full control of private repositories" and "Full control of projects")
      • change the project URLs and field values in the "add to project and set project fields" section of .github/workflows/taskeract-created.yml
    • If you won't be using Project Boards, or you'll be using their native mechanism for adding issues:
      • delete the section under "add to project and set project fields" in .github/workflows/taskeract-created.yml

Adding or deleting fields

Fields can be safely deleted from any issue template and the relevant field-mapping JSON file

New fields can be added to any issue template without affecting the automation

To add a field and create custom automation for that field:

Adding a new task type

First, add a new issue template.

Next, add a new field-mapping-[TYPE].json file inside .github/workflows/taskeract/

Lastly, add any project assignments or field values needed to .github/workflows/taskeract-created.yml under "add to project and set project fields"

Note that unused task types can be safely removed by simply deleting their issue template and associated "field-mapping-[TYPE].json" file