Skip to content

Commit

Permalink
doc: Add section "Enable auto-author-assign for the issues"
Browse files Browse the repository at this point in the history
  • Loading branch information
toshimaru committed Aug 1, 2022
1 parent 5cbe7a9 commit e5c259b
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,17 @@ This action automatically assigns PR author as an assignee.
name: Auto Author Assign

on:
issues:
types: [ opened, reopened ]
pull_request_target:
types: [ opened, reopened ]

permissions:
issues: write
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v1.6.0

```

## Use your own token
Expand All @@ -48,11 +44,32 @@ jobs:
- uses: toshimaru/auto-author-assign
with:
repo-token: ${{ secrets.YOUR_TOKEN }}

```

If not specified, `GITHUB_TOKEN` will be used by default.

## Enable auto-author-assign for the issues

An issue author can be automatically assigned as an issue assignee.

- Add `issues` to the trigger
- Add `issues: write` to the permissions

```yml
on:
issues:
types: [ opened, reopened ]
pull_request_target:
types: [ opened, reopened ]

permissions:
issues: write
pull-requests: write

jobs:
...
```

## Skip assigning author

`auto-author-assign` action skips assigning the author when:
Expand Down

0 comments on commit e5c259b

Please sign in to comment.