From c8095bcc24a30034966e316cd64cb059d8de26d4 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Tue, 6 Dec 2022 17:06:41 -0600 Subject: [PATCH] Automatically add `untriaged` label on issues (#2297) Sometimes when new issues are opened, they don't use the template or are transfered in from another repo, or even are reopened when we ran triage slightly differently. This automation adds the `untriaged` tag if any of these states are applied. Coming from https://github.com/opensearch-project/.github/pull/111 Signed-off-by: Peter Nied --- .github/workflows/add-untriaged.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/add-untriaged.yml diff --git a/.github/workflows/add-untriaged.yml b/.github/workflows/add-untriaged.yml new file mode 100644 index 0000000000..15b9a55651 --- /dev/null +++ b/.github/workflows/add-untriaged.yml @@ -0,0 +1,19 @@ +name: Apply 'untriaged' label during issue lifecycle + +on: + issues: + types: [opened, reopened, transferred] + +jobs: + apply-label: + runs-on: ubuntu-latest + steps: + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['untriaged'] + })