Skip to content

Commit

Permalink
changing again
Browse files Browse the repository at this point in the history
  • Loading branch information
ANSHIKA-26 committed Oct 2, 2024
1 parent d3352ba commit addb9ed
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/issue_thank.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,28 @@ jobs:
auto-assign:
runs-on: ubuntu-latest

permissions:
issues: write

steps:
- name: 'Thank and assign the issue to the creator'
uses: actions/github-script@v6
uses: actions/github-script@v7 # Updated to v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # This line uses the token
github-token: ${{ secrets.GITHUB_TOKEN }} # Use auto-generated GitHub Token
script: |
const issueNumber = context.issue.number;
const issueCreator = context.payload.issue.user.login;
// Thank the issue creator
await github.issues.createComment({
await github.rest.issues.createComment({
issue_number: issueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Thanks @${issueCreator} for raising this issue!`
body: `Thanks @${issueCreator} for raising this issue! We'll look into it. Meanwhile, it's been assigned to you for further tracking.`
});
// Assign the issue to the creator
await github.issues.addAssignees({
await github.rest.issues.addAssignees({
issue_number: issueNumber,
owner: context.repo.owner,
repo: context.repo.repo,
Expand Down

0 comments on commit addb9ed

Please sign in to comment.