mirror of
https://github.com/espressif/openthread.git
synced 2026-09-11 03:30:09 +00:00
[size-report] checkout pull request head (#11724)
This commit is contained in:
+1
-1
@@ -32,7 +32,7 @@ set -euo pipefail
|
||||
OT_TMP_DIR=/tmp/ot-size-report
|
||||
readonly OT_TMP_DIR
|
||||
|
||||
OT_SHA_NEW=${GITHUB_SHA:-$(git rev-parse HEAD)}
|
||||
OT_SHA_NEW="$(git rev-parse HEAD)"
|
||||
readonly OT_SHA_NEW
|
||||
|
||||
OT_SHA_OLD="${OT_SHA_OLD:-$(git cat-file -p "${OT_SHA_NEW}" | grep 'parent ' | head -n1 | cut -d' ' -f2)}"
|
||||
|
||||
@@ -54,6 +54,14 @@ get_pr_body()
|
||||
{
|
||||
local pr
|
||||
|
||||
if [[ -z ${PR_BODY+x} ]]; then
|
||||
echo 'PR_BODY is not set' >&2
|
||||
else
|
||||
echo 'PR_BODY is set' >&2
|
||||
echo "${PR_BODY}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
[[ ${GITHUB_ACTIONS+x} && ${GITHUB_REF-} =~ ^refs/pull/[0-9]+/merge ]] || {
|
||||
echo 'Not a pull request.' >&2
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user