[Add] 33 JavaScript concepts #30
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: Auto assign & Label | |
on: | |
issues: | |
types: [opened] | |
jobs: | |
auto-assign: | |
runs-on: ubuntu-latest | |
permissions: | |
issues: write | |
steps: | |
# From Github marketplace: https://github.com/marketplace/actions/auto-assign-issue | |
- name: 'Auto-assign issue' | |
uses: pozil/auto-assign-issue@v1 | |
with: | |
assignees: juanPabloDiaz | |
numOfAssignee: 1 | |
allowSelfAssign: true | |
- name: Check issue title for 'add' keyword and add good first issue label | |
if: contains(github.event.issue.title, 'add') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
issue_number=$(jq -r '.issue.number' "$GITHUB_EVENT_PATH") | |
labels='["good first issue"]' | |
curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/${GITHUB_REPOSITORY}/issues/${issue_number}/labels \ | |
-d "$labels" |