⬆️ Updates coverallsapp/github-action action to v1.1.3 #1172
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Claim Issue | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
assign: | |
name: Update labels and Assign | |
if: github.event.issue.pull_request == '' | |
&& contains(github.event.comment.body, '/claim') | |
&& contains(toJson(github.event.issue.labels), 'Available') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/github-script@v3.1 | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
await github.issues.addLabels({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
labels: ['Status: Claimed'] | |
}) | |
await github.issues.removeLabel({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
name: 'Status: Available' | |
}) | |
await github.issues.addAssignees({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
assignees: [context.payload.sender.login] | |
}) | |
await github.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Thank you @'+context.payload.sender.login+' for claiming this issue! 🎉 \n\nPlease reference this issue when you submit your Pull Request and make sure you follow the [contributing guidelines](https://github.com/AlexRogalskiy/weather-sprites/blob/master/.github/CONTRIBUTING.md).' | |
}) |