Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 62e1128

Browse files
feat: support pull_request_target events (#52)
1 parent 2310d7e commit 62e1128

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ jobs:
9191
uses: opensource-nepal/commitlint@v1
9292
```
9393
94-
> **_NOTE:_** commitlint GitHub Actions will only be triggered by "push"or "pull_request" events.
94+
> **_NOTE:_** commitlint GitHub Actions will only be triggered by "push", "pull_request", or "pull_request_target" events. The difference between "pull_request" and "pull_request_target" is that "pull_request" is more secure for public repos while "pull_request_target" is necessary for private repos.
9595
9696
#### GitHub Action Inputs
9797

‎github_actions/run.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# Events
1414
EVENT_PUSH = "push"
1515
EVENT_PULL_REQUEST = "pull_request"
16+
EVENT_PULL_REQUEST_TARGET = "pull_request_target"
1617

1718
# Inputs
1819
INPUT_FAIL_ON_ERROR = "INPUT_FAIL_ON_ERROR"
@@ -174,7 +175,7 @@ def main() -> None:
174175

175176
if event.event_name == EVENT_PUSH:
176177
_handle_push_event(event)
177-
elif event.event_name ==EVENT_PULL_REQUEST:
178+
elif event.event_name in {EVENT_PULL_REQUEST, EVENT_PULL_REQUEST_TARGET}:
178179
_handle_pr_event(event)
179180
elif event.event_name is None:
180181
sys.stdout.write("No any events, skipping\n")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /