Skip to content

Commit

Permalink
feat: added auto-assign lable
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyanthakur committed Oct 6, 2024
1 parent 8341ff7 commit 516ba81
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ name: 'Auto Label Assignment'
on:
issues:
types: [opened]
pull_request:
pull_request_target: # Changed to pull_request_target
types: [opened]

permissions: # Set permissions for the workflow
issues: write
pull-requests: write

jobs:
assign-labels:
runs-on: ubuntu-latest
Expand All @@ -24,9 +28,9 @@ jobs:
run: |
# Always add these labels
echo "Adding always assigned labels: hacktoberfest, hacktoberfest-accepted, hactoberfest2024"
gh issue edit ${{ github.event.issue.number || github.event.pull_request.number }} --add-label "hacktoberfest"
gh issue edit ${{ github.event.issue.number || github.event.pull_request.number }} --add-label "hacktoberfest-accepted"
gh issue edit ${{ github.event.issue.number || github.event.pull_request.number }} --add-label "hactoberfest2024"
gh pr edit ${{ github.event.pull_request.number }} --add-label "hacktoberfest"
gh pr edit ${{ github.event.pull_request.number }} --add-label "hacktoberfest-accepted"
gh pr edit ${{ github.event.pull_request.number }} --add-label "hactoberfest2024"
- name: Auto assign specific labels based on conditions
env:
Expand Down

0 comments on commit 516ba81

Please sign in to comment.