diff --git a/.github/workflows/label-when-closed.yml b/.github/workflows/label-when-closed.yml deleted file mode 100644 index d54edfe..0000000 --- a/.github/workflows/label-when-closed.yml +++ /dev/null @@ -1,55 +0,0 @@ -# https://github.com/marketplace/actions/github-script - -name: Labele issue when closed -on: - issues: - types: [closed] - -jobs: - label_issues: - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - uses: actions/github-script@v6 - with: - script: console.log(context) - - 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: ["[Status] Done"] - }) - - uses: actions/github-script@v6 - if: contains(github.event.issue.labels.*.name, '[Status] To do') - with: - script: | - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ["[Status] To do"] - }) - - uses: actions/github-script@v6 - if: contains(github.event.issue.labels.*.name, '[Status] In progress') - with: - script: | - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ["[Status] In progress"] - }) - - uses: actions/github-script@v6 - if: contains(github.event.issue.labels.*.name, '[Status] Review') - with: - script: | - github.rest.issues.removeLabel({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - name: ["[Status] Review"] - })