Skip to content

Commit

Permalink
ENH: Add automatic labeling of issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sjh26 authored Jan 14, 2025
1 parent 9951397 commit 1907d48
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,20 @@ assignees:
body:

- type: dropdown
id: draft-status
attributes:
label: Draft Status
description: Select whether the project is ready to be created once this issue is submitted.
options:
- Ready - team will start page creating immediately
- Draft - team will hold off on page creation
- ready
- draft
validations:
required: true

- type: markdown
attributes:
value: |
_Please enter a project name in the title bar above this text. Format: "Project: Project Name"._
_Please enter a project name in the title bar above this text. Avoid special characters and parentheses. Format: "Project: Project Name"._
- type: dropdown
attributes:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/issue-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Issue labeler
on:
issues:
types: [ opened ]

permissions:
contents: read

jobs:
label-component:
if: github.event.label.name == 'project'
runs-on: ubuntu-latest

permissions:
# required for all workflows
issues: write


steps:
- uses: actions/checkout@v3

- name: Parse issue form
uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/project.yml

- name: Set labels based on draft status field
uses: redhat-plumbers-in-action/advanced-issue-labeler@v2
with:
issue-form: ${{ steps.issue-parser.outputs.jsonString }}
section: draft-status
block-list: |
None
Other
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1907d48

Please sign in to comment.