-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from ygowthamr/IssueLabeler
Added Issue labeler work flow
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Issue Labeler | ||
|
||
on: | ||
issues: | ||
types: [opened, edited] | ||
|
||
jobs: | ||
manage-labels: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Create or Update Labels | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
curl -X POST \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/labels \ | ||
-d '{ | ||
"name": "gssoc-ext", | ||
"color": "0e4075", | ||
"description": "GSSOC extended contribution" | ||
}' | ||
curl -X POST \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/labels \ | ||
-d '{ | ||
"name": "hacktoberfest", | ||
"color": "006b75", | ||
"description": "Hacktoberfest participation" | ||
}' | ||
curl -X POST \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/labels \ | ||
-d '{ | ||
"name": "hacktoberfest-accepted", | ||
"color": "95d2aa", | ||
"description": "Hacktoberfest contribution accepted" | ||
}' | ||
curl -X POST \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
https://api.github.com/repos/${{ github.repository }}/labels \ | ||
-d '{ | ||
"name": "level?", | ||
"color": "5319e7", | ||
"description": "Placeholder for difficulty level" | ||
}' | ||
- name: Add Labels to Issue | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: | | ||
gssoc-ext | ||
hacktoberfest | ||
hacktoberfest-accepted | ||
level? |