Skip to content

Commit

Permalink
label on assigned
Browse files Browse the repository at this point in the history
  • Loading branch information
leogopal committed Apr 5, 2024
1 parent 544af11 commit d9fae6f
Showing 1 changed file with 4 additions and 10 deletions.
@@ -1,7 +1,7 @@
# https://github.com/marketplace/actions/github-script

name: Label issue when assigned
on:
on:
issues:
types: [assigned]

Expand All @@ -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({
Expand Down

0 comments on commit d9fae6f

Please sign in to comment.