Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Issue Triage workflow #55

Merged
merged 1 commit into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/Labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,16 @@
description: Further information is requested
color: 'd876e3'
aliases: []

- name: urgency:low
description: Little to no impact
color: '00d26a'
aliases: []
- name: urgency:medium
description: Important with a moderate impact
color: 'fcd53f'
aliases: []
- name: urgency:high
description: Significant with a critical impact
color: 'ff6723'
aliases: []
42 changes: 42 additions & 0 deletions .github/workflows/IssueTriager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow assists with initial triage of new issues by applying
# labels based on data provided in the issue.
#
# Configuration file that maps issue form input values to labels:
# advanced-issue-labeler.yml
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# For more information, see:
# https://github.com/stefanbuck/github-issue-parser
# https://github.com/redhat-plumbers-in-action/advanced-issue-labeler

name: Issue Triage Workflow

on:
workflow_call:

jobs:
triage_issues:
name: Triage Issues
runs-on: ubuntu-latest

strategy:
matrix:
template: [ bug_report.yml, documentation_request.yml, feature_request.yml ]

steps:
- uses: actions/checkout@v3

- name: Parse Issue Form
uses: stefanbuck/github-issue-parser@v2
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/${{ matrix.template }}

- name: Apply Labels from Triage
uses: redhat-plumbers-in-action/advanced-issue-labeler@v2
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
template: ${{ matrix.template }}
token: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .sync/Files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,31 @@ group:
microsoft/mu_tiano_platforms
microsoft/mu_tiano_plus

# Leaf Workflow - Issue Triage
- files:
- source: .sync/workflows/leaf/triage-issues.yml
dest: .github/workflows/triage-issues.yml
# Note: This file name (`advanced-issue-labeler.yml`) and path (`/.github/`) is
# not configurable right now. Otherwise, this would get placed in a file
# at `.github/workflows/triage-issues/issue-label-mapping.yml`.
- source: .sync/workflows/config/triage-issues/advanced-issue-labeler.yml
dest: .github/advanced-issue-labeler.yml
repos: |
microsoft/mu
microsoft/mu_basecore
microsoft/mu_common_intel_min_platform
microsoft/mu_crypto_release
microsoft/mu_feature_config
microsoft/mu_feature_ipmi
microsoft/mu_feature_mm_supv
microsoft/mu_feature_uefi_variable
microsoft/mu_oem_sample
microsoft/mu_plus
microsoft/mu_silicon_arm_tiano
microsoft/mu_silicon_intel_tiano
microsoft/mu_tiano_platforms
microsoft/mu_tiano_plus

# Leaf Workflow - Label Sync
- files:
- source: .sync/workflows/leaf/label-sync.yml
Expand Down
42 changes: 42 additions & 0 deletions .sync/workflows/config/triage-issues/advanced-issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Defines the mappings between GitHub issue responses and labels applied to the issue
# for Project Mu repos.
#
# IMPORTANT: Only use labels defined in the .github/Labels.yml file in this repo.
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
# For more information, see:
# https://github.com/redhat-plumbers-in-action/advanced-issue-labeler

policy:
- template: [bug_report.yml, documentation_request.yml, feature_request.yml]
section:

# Issue Template - Urgency Dropdown
- id: ['urgency']
block-list: []
label:
- name: 'urgency:low'
keys: ['Low']
- name: 'urgency:medium'
keys: ['Medium']
- name: 'urgency:high'
keys: ['High']

# Issue Template - Fix Owner Dropdown
- id: ['fix_owner', 'request_owner']
block-list: []
label:
- name: 'state:needs-owner'
keys: [
'Someone else needs to fix it',
'Someone else needs to make the change',
'Someone else needs to implement the feature'
]
- name: 'state:needs-triage'
keys: [
'Someone else needs to fix it',
'Someone else needs to make the change',
'Someone else needs to implement the feature'
]
22 changes: 22 additions & 0 deletions .sync/workflows/leaf/triage-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow assists with initial triage of new issues by applying
# labels based on data provided in the issue.
#
# NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
# instead of the file in this repo.
#
# - Mu DevOps Repo: https://github.com/microsoft/mu_devops
# - File Sync Settings: https://github.com/microsoft/mu_devops/blob/main/.sync/Files.yml
#
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: BSD-2-Clause-Patent
#

name: Initial Triage for New Issue

on:
issues:
types: [ opened ]

jobs:
sync:
uses: microsoft/mu_devops/.github/workflows/IssueTriager.yml@main
16 changes: 16 additions & 0 deletions ReadMe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,22 @@ To see more about this flow look in these files:
A Project Mu repo simply needs to sync `.sync/workflows/leaf/release-draft.yml` to their repo and adjust any parameters
needed in the sync process (like repo default branch name) and the release draft workflow will run in the repo.

Initial Issue Triage
--------------------

This repo syncs `GitHub issue form templates`_ to many Project Mu repos. Part of initial triage for incoming issues
involves parsing data in the issue form to apply the appropriate labels so the issue is ready for triage by a human.

Issues need to be triaged by a human when the `state:needs-triage` label is present. This workflow can parse details
provided in issue forms to apply additional labels. For example, the `state:needs-owner` label is applied if the user
indicates they are not fixing the issue, the `urgency:<level>` label is applied based on user selection in the urgency
dropdown, etc.

A Project Mu repo simply needs to sync `.sync/workflows/leaf/triage-issues.yml` to their repo and the issue triage
workflow will run in the repo.

.. _`GitHub issue form templates`: https://github.com/microsoft/mu_devops/tree/main/.sync/github_templates/ISSUE_TEMPLATE

Links
=====
- `Basic Azure Landing Site <https://docs.microsoft.com/en-us/azure/devops/pipelines/?view=azure-devops>`_
Expand Down