Skip to content

Commit

Permalink
Merge pull request #166 from ygowthamr/IssueLabeler
Browse files Browse the repository at this point in the history
Added Issue labeler work flow
  • Loading branch information
rohitinu6 authored Oct 25, 2024
2 parents 16eb232 + d5c7c17 commit e4c8bd5
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/issue_labeler.yaml
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?

0 comments on commit e4c8bd5

Please sign in to comment.