From a664f9cc6a1c991415d4e4db55d32c9b47b49863 Mon Sep 17 00:00:00 2001 From: Romain Bazile Date: Thu, 17 Sep 2020 11:29:37 +0200 Subject: [PATCH] Create auto-label.yml Create automation to push labeled issues/PR directly to the hardware or software projects --- .github/workflows/auto-label.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/auto-label.yml diff --git a/.github/workflows/auto-label.yml b/.github/workflows/auto-label.yml new file mode 100644 index 0000000..db531db --- /dev/null +++ b/.github/workflows/auto-label.yml @@ -0,0 +1,32 @@ +name: Auto Assign to Projects based on software/hardware label + +on: + issues: + types: [labeled] + pull_request: + types: [labeled] +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + assign_one_project: + runs-on: ubuntu-latest + name: Assign to projects based on label + steps: + - name: Assign issues and pull requests with `hardware` label to project `Hardware` + uses: srggrs/assign-one-project-github-action@1.2.0 + if: | + contains(github.event.issue.labels.*.name, 'hardware') || + contains(github.event.pull_request.labels.*.name, 'hardware') + with: + project: 'https://github.com/PlanktonPlanet/PlanktonScope/projects/2' + column_name: 'Bugs' + + - name: Assign issues and pull requests with `software` label to project `Sofware` + uses: srggrs/assign-one-project-github-action@1.2.0 + if: | + contains(github.event.issue.labels.*.name, 'bug') || + contains(github.event.pull_request.labels.*.name, 'bug') + with: + project: 'https://github.com/PlanktonPlanet/PlanktonScope/projects/1' + column_name: 'To Do'