From 6cf6d126fac911c930b08bfd15f932cf78507c2e Mon Sep 17 00:00:00 2001 From: Samarth2190 Date: Mon, 20 Oct 2025 18:04:54 +0530 Subject: [PATCH] new workflow --- .github/workflows/auto-assign.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/auto-assign.yml diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml new file mode 100644 index 0000000..dfeddfd --- /dev/null +++ b/.github/workflows/auto-assign.yml @@ -0,0 +1,26 @@ +name: Auto-assign issue creator + +on: + issues: + types: [opened] + +permissions: + issues: write # required to assign issues + +jobs: + auto-assign: + runs-on: ubuntu-latest + steps: + - name: Assign issue to creator + uses: actions/github-script@v7 + with: + script: | + const issueNumber = context.issue.number; + const issueAuthor = context.payload.issue.user.login; + + await github.rest.issues.addAssignees({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: issueNumber, + assignees: [issueAuthor] + });