Skip to content

Commit

Permalink
feat: auto assign author to assignees workflow (#6)
Browse files Browse the repository at this point in the history
* feat: auto assign author to assignees workflow

* fix: rename workflow to workflows

* test: test assignees

* fix: restore pr-template types synchronized to opened
  • Loading branch information
poiu694 authored May 16, 2024
1 parent 0a28f26 commit df58b4e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/auto-assign-assignees.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: auto assign author to assignees

on:
pull_request:
types: [opened]

jobs:
add-assignees:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Add assignee
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.issues.addAssignees({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
assignees: [context.payload.pull_request.user.login]
})

0 comments on commit df58b4e

Please sign in to comment.