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

Adding pull_request_target #103

Merged
merged 2 commits into from
Aug 28, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ This action allows you to add comments, reviewers and assignees to a pull reques
- [Rule Examples](#rule-examples)
- [Input parameters](#input-parameters)
- [Output](#output)
- [Events](#events)
- [Examples](#examples)
- [Basic example](#basic-example)
- [Using output](#using-output)
Expand Down Expand Up @@ -156,6 +157,16 @@ See the [Using Output](#Using-Output) example for more details.

<hr>

## Events

Use herald action can only be used on the following events:

- `pull_request`
- `pull_request_target`
- `push`

Any other event will produce an error in the workflow

## Examples

### Basic example
Expand Down
2 changes: 1 addition & 1 deletion __tests__/index.envMocked.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('use-herald', () => {
expect(setFailed.mock.calls).toMatchInlineSnapshot(`
Array [
Array [
[Error: use-herald-action only supports [pull_request, push] events for now, event found: tag],
[Error: use-herald-action only supports [pull_request, pull_request_target, push] events for now, event found: tag],
],
]
`);
Expand Down
5 changes: 3 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/src/util/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export declare const OUTPUT_NAME = "appliedRules";
export declare const FILE_ENCODING = "utf8";
export declare enum SUPPORTED_EVENT_TYPES {
PULL_REQUEST = "pull_request",
PULL_REQUEST_TARGET = "pull_request_target",
push = "push"
}
interface Commit {
Expand Down
2 changes: 2 additions & 0 deletions src/util/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ export const OUTPUT_NAME = 'appliedRules';
export const FILE_ENCODING = 'utf8';
export enum SUPPORTED_EVENT_TYPES {
PULL_REQUEST = 'pull_request',

PULL_REQUEST_TARGET = 'pull_request_target',
push = 'push',
}
interface Commit {
Expand Down