Skip to content

Commit

Permalink
Update schedule-monthly-reopen.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
t-will-gillis authored Nov 20, 2023
1 parent 39eabf3 commit aa43ced
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/schedule-monthly-reopen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:



# Currently, this triggers ALL comments. not good.
# Currently, this is triggered by any new comment on any issue. not good.
jobs:

# Checks to see whether the title of the issue contains the words 'Review Inactive Team Members'
# AND whether the comment's body contains the words 'want to come back' OR 'bot made a mistake'
First-Pass:
if: ${{ contains(github.event.issue.title, 'Review Inactive Team Members') && (contains(github.event.comment.body, 'want to come back') || contains(github.event.comment.body, 'bot made a mistake')) }}
runs-on: ubuntu-latest
steps:

# Checks to see whether the title of the issue contains the words 'Review Inactive Team Members'
# AND whether the comment's body contains the words 'want to come back' OR 'bot made a mistake'
steps:
- name: Check comment
id: check-comment
uses: actions/github-script@v7
Expand All @@ -25,6 +25,19 @@ jobs:
console.log("The issue number is: " + issueNumber)
return issueNumber
# Apply the `ready for dev lead` label
- name: Add Dev Lead label
id: add-dev-lead
uses: actions/github-script@v7
with:
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ steps.check-comment.outputs.result }},
labels: ['ready for dev lead'],
});
# Reopens the issue
- name: Reopen issue
run: gh issue reopen "https://github.com/t-will-gillis/website/issues/${{ steps.check-comment.outputs.result }}"
Expand Down

0 comments on commit aa43ced

Please sign in to comment.