diff --git a/.github/workflows/WIP/label-when-assigned.yml b/.github/workflows/label-when-assigned.yml similarity index 82% rename from .github/workflows/WIP/label-when-assigned.yml rename to .github/workflows/label-when-assigned.yml index 17db7e6..798b67d 100644 --- a/.github/workflows/WIP/label-when-assigned.yml +++ b/.github/workflows/label-when-assigned.yml @@ -1,7 +1,7 @@ # https://github.com/marketplace/actions/github-script name: Label issue when assigned -on: +on: issues: types: [assigned] @@ -16,23 +16,17 @@ jobs: with: script: console.log(context) - uses: actions/github-script@v6 - if: contains(github.event.issue.labels.*.name, '[Status] To do') + if: contains(github.event.issue.labels.*.name, 'Awaiting Triage') with: script: | - github.rest.issues.addLabels({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - labels: ["[Status] In progress"] - }) github.rest.issues.removeLabel({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, - name: ["[Status] To do"] + name: ["Awaiting Triage"] }) # - uses: actions/github-script@v6 - # if: contains(github.event.issue.labels.*.name, '[Status] To do') && ${{ !github.event.issue.assignee }} + # if: contains(github.event.issue.labels.*.name, '[Status] To do') && ${{ !github.event.issue.assignee }} # with: # script: | # github.rest.issues.removeLabel({