mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 04:58:53 +08:00
Prefer .pull_request.base.sha than .before in case of force-push.
This commit is contained in:
parent
7925921803
commit
99c828f01d
|
@ -22,14 +22,14 @@ prereqs() {
|
|||
fi)
|
||||
}
|
||||
|
||||
BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.before')
|
||||
if [ "$BASE" = 'null' ]; then
|
||||
BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.pull_request.base.sha')
|
||||
if [ "$BASE" = 'null' ]; then
|
||||
BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.before')
|
||||
fi
|
||||
|
||||
HEAD=$(cat "$GITHUB_EVENT_PATH" | jq -r '.after')
|
||||
if [ "$HEAD" = 'null' ]; then
|
||||
HEAD=$(cat "$GITHUB_EVENT_PATH" | jq -r '.pull_request.head.sha')
|
||||
if [ "$HEAD" = 'null' ]; then
|
||||
HEAD=$(cat "$GITHUB_EVENT_PATH" | jq -r '.after')
|
||||
fi
|
||||
|
||||
COMMIT_RANGE="${BASE}..${HEAD}"
|
||||
|
|
Loading…
Reference in New Issue
Block a user