Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set default value for repo-token #32

Merged
merged 6 commits into from May 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
@@ -1,5 +1,7 @@
name: 'Auto Author Assign'
on: [pull_request_target]
permissions:
pull-requests: write
jobs:
assign-author:
runs-on: ubuntu-latest
Expand All @@ -8,5 +10,3 @@ jobs:
uses: actions/checkout@v2
- name: Test toshimaru/auto-author-assign action
uses: ./ # Uses an action in the root directory
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
20 changes: 17 additions & 3 deletions README.md
Expand Up @@ -14,7 +14,7 @@ This action automatically assigns PR author as an assignee.

## Usage

```yaml
```yml
# .github/workflows/auto-author-assign.yml
name: 'Auto Author Assign'

Expand All @@ -30,11 +30,25 @@ jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v1.3.0
- uses: toshimaru/auto-author-assign@v1.3.2
```

## Use your token

You can specify your own token.

```yml
jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
repo-token: "${{ secrets.YOUR_TOKEN }}"
```

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

## Skip assigning author

`auto-author-assign` action skips assigning the author when:
Expand Down
1 change: 1 addition & 0 deletions action.yml
Expand Up @@ -5,6 +5,7 @@ inputs:
repo-token:
description: 'A token for the repository'
required: true
default: '${{ github.token }}'
runs:
using: 'node12'
main: 'dist/index.js'
Expand Down