From e4a1e032a3b160282811691de8e5a4f8fe0334f6 Mon Sep 17 00:00:00 2001 From: Marc Handalian Date: Mon, 11 Dec 2023 14:01:34 -0800 Subject: [PATCH] Consolidate add-untriaged into triage workflow Signed-off-by: Marc Handalian --- .github/workflows/add-untriaged.yml | 20 -------------------- .github/workflows/triage.yml | 10 ++++++++-- 2 files changed, 8 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/add-untriaged.yml diff --git a/.github/workflows/add-untriaged.yml b/.github/workflows/add-untriaged.yml deleted file mode 100644 index 38de96f663051..0000000000000 --- a/.github/workflows/add-untriaged.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Apply 'untriaged' label during issue lifecycle - -on: - issues: - types: [opened, reopened, transferred] - -jobs: - apply-label: - if: github.repository == 'opensearch-project/OpenSearch' - runs-on: ubuntu-latest - steps: - - uses: actions/github-script@v7 - with: - script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ['untriaged'] - }) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index be1dede36cf58..fe2cd6e0b9a51 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -2,11 +2,11 @@ name: Auto triage based on the component label in issue on: issues: - types: [opened] + types: [opened, reopened, transferred] jobs: apply-label: - if: github.repository == 'opensearch-project/OpenSearch' + if: github.repository == 'mch2/OpenSearch' runs-on: ubuntu-latest steps: - uses: actions/github-script@v7 @@ -26,3 +26,9 @@ jobs: labels: [ `${ component_label }` ], } ); } + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ['untriaged'] + })