From 01423e36c98124a481c2e9fab9ae93534d56b781 Mon Sep 17 00:00:00 2001 From: max furman Date: Sun, 24 Jul 2022 22:38:34 -0700 Subject: [PATCH] [action] combine label and triage project add in one workflow --- .github/workflows/labeler.yml | 12 ------------ .github/workflows/triage.yml | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 12 deletions(-) delete mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/triage.yml diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index bf5b4bc0..00000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Pull Request Labeler -on: - pull_request_target - -jobs: - label: - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v3.0.2 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 00000000..c16aacd8 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,29 @@ +name: Add Issues and PRs to Triage + +on: + issues: + types: + - opened + pull_request_target: + types: + - opened + +jobs: + + label: + name: Label PR + runs-on: ubuntu-latest + if: github.event_name == 'pull_request_target' + steps: + - uses: actions/labeler@v3.0.2 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + + add-to-project: + name: Add to Triage Project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.3.0 + with: + project-url: https://github.com/orgs/smallstep/projects/94 + github-token: ${{ secrets.TRIAGE_PAT }}