-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from lionel1704/update-v2
Update to actions v2
- Loading branch information
Showing
2 changed files
with
19 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,27 +4,27 @@ If your team currently uses pull request assignees but would like to switch to | |
|
||
## Usage | ||
|
||
This Action subscribes to [Pull request events](https://developer.github.com/v3/activity/events/types/#pullrequestevent) which fire whenever users are assigned or unassigned to pull requests. | ||
This Action subscribes to [Pull request events](https://help.github.com/en/articles/events-that-trigger-workflows#pull-request-event-pull_request) specifically the `assigned` and `unassigned` events which fire whenever users are assigned or unassigned to pull requests. | ||
|
||
```workflow | ||
workflow "Assign reviewers based on assignees" { | ||
on = "pull_request" | ||
resolves = ["Assignee to reviewer"] | ||
} | ||
action "Assignee to reviewer" { | ||
uses = "pullreminders/assignee-to-reviewer-action@master" | ||
secrets = [ | ||
"GITHUB_TOKEN" | ||
] | ||
# add this line if you want to continue running parallel github actions even if this action is skipped/not needed | ||
env = { | ||
REVIEWERS_UNMODIFIED_EXIT_CODE = "0" | ||
} | ||
} | ||
name: Assign reviewers based on assignees | ||
on: | ||
pull_request: | ||
types: [assigned, unassigned] | ||
jobs: | ||
assignee_to_reviewer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Assignee to Reviewer | ||
uses: pullreminders/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
``` | ||
|
||
Note that the workflow for `pull_request` events will be triggered by default only for `opened`, `synchronize` or `reopened` activity types. For other, events the `types` keyword must be used. | ||
|
||
## Demo | ||
|
||
<img src="https://github.com/pullreminders/assignee-to-reviewer-action/raw/master/docs/images/example.png" width="540"> | ||
|
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