Skip to content

Commit

Permalink
label
Browse files Browse the repository at this point in the history
  • Loading branch information
ANSHIKA-26 committed Oct 2, 2024
1 parent 2b52b20 commit 42b6f32
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/issue_thank.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Auto Assign and Thank Issues
name: Auto Assign, Thank, and Label Issues

on:
issues:
Expand All @@ -13,10 +13,10 @@ jobs:
issues: write

steps:
- name: 'Thank and assign the issue to the creator'
uses: actions/github-script@v7 # Updated to v7
- name: 'Thank, assign, and label the issue'
uses: actions/github-script@v7 # Latest version
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Use auto-generated GitHub Token
github-token: ${{ secrets.GITHUB_TOKEN }} # Use GitHub Token
script: |
const issueNumber = context.issue.number;
const issueCreator = context.payload.issue.user.login;
Expand All @@ -36,3 +36,11 @@ jobs:
repo: context.repo.repo,
assignees: [issueCreator]
});
// Add the label "ggsoc-ext" to the issue
await github.rest.issues.addLabels({
issue_number: issueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['ggsoc-ext'] # Label to be added
});

0 comments on commit 42b6f32

Please sign in to comment.