From 02d505c4aedbaaf2eb937426939881613897b9a8 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Mon, 5 Dec 2022 18:54:13 +0000 Subject: [PATCH] Automatically add `untriaged` label on issues 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'] + })