Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 4a026f2

Browse files
authored
Remove legacy checks inside entrypoint.sh (#35)
There is no need for then in the era of the new actions since it's possible to control when an action is triggered via YAML config and particularly `if` statement. Fixes #34
1 parent de548bc commit 4a026f2

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

entrypoint.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,6 @@
22

33
set -e
44

5-
# Workaround unitl new Actions support neutral strategy
6-
# See how it was before: https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/#exit-codes-and-statuses
7-
NEUTRAL_EXIT_CODE=0
8-
9-
# skip if no /rebase
10-
echo "Checking if comment contains '/rebase' command..."
11-
(jq -r ".comment.body" "$GITHUB_EVENT_PATH" | grep -Fq "/rebase") || exit $NEUTRAL_EXIT_CODE
12-
13-
# skip if not a PR
14-
echo "Checking if issue is a pull request..."
15-
(jq -r ".issue.pull_request.url" "$GITHUB_EVENT_PATH") || exit $NEUTRAL_EXIT_CODE
16-
17-
if [[ "$(jq -r ".action" "$GITHUB_EVENT_PATH")" != "created" ]]; then
18-
echo "This is not a new comment event!"
19-
exit $NEUTRAL_EXIT_CODE
20-
fi
21-
225
PR_NUMBER=$(jq -r ".issue.number" "$GITHUB_EVENT_PATH")
236
echo "Collecting information about PR #$PR_NUMBER of $GITHUB_REPOSITORY..."
247

0 commit comments

Comments
 (0)