Skip to content

part-2

part-2 #2

Workflow file for this run

name: Assign Issue to Creator
on:
issues:
types:
- opened
jobs:
assign-to-creator:
runs-on: ubuntu-latest
steps:
- name: Assign Issue to Creator
uses: actions/github-script@v7
with:
script: |
const issueNumber = context.payload.issue.number;
const creator = context.payload.issue.user.login;
await github.issues.addAssignees({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
assignees: [creator],
});
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}