chore: version update #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-assignee | |
on: | |
issues: | |
types: [opened] | |
pull_request: | |
types: [opened] | |
jobs: | |
assign: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Assign to creator | |
uses: actions/github-script@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
const issue = context.payload.issue || context.payload.pull_request; | |
const creator = issue.user.login; | |
const issue_number = issue.number; | |
const owner = context.repo.owner; | |
const repo = context.repo.repo; | |
console.log(`Assigning issue #${issue_number} to ${creator}`); | |
await github.issues.addAssignees({ owner, repo, issue_number, assignees: [creator] }); |