Skip to content

Commit

Permalink
Merge pull request Rakshit-gen#85 from ygowthamr/IssueLabeler
Browse files Browse the repository at this point in the history
Added Issue labeler GitHub action
  • Loading branch information
Rakshit-gen authored Oct 23, 2024
2 parents 7954b10 + 4decc3e commit a126b42
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflow/issue_labeler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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-extd",
"color": "0E8A16",
"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-accepted",
"color": "FF7518",
"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": "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-extd
hacktoberfest
level?

0 comments on commit a126b42

Please sign in to comment.