Fix CIRCLE_PR_NUMBER may not always be set (#28640)

Summary:
This fixes build failures where `CIRCLE_PR_NUMBER` is not set. This can happen if the PR did not come from a fork.

## Changelog

[Internal] [Fixed] - Fix CIRCLE_PR_NUMBER may not always be set
Pull Request resolved: https://github.com/facebook/react-native/pull/28640

Test Plan: Report bundle size step should pass on both this PR and https://github.com/facebook/react-native/issues/28641.

Reviewed By: cpojer

Differential Revision: D21045553

Pulled By: TheSavior

fbshipit-source-id: fdfcb1bb88a96345b78ca69c49623df71d4cd608
This commit is contained in:
Tommy Nguyen
2020-04-15 11:43:23 -07:00
committed by Facebook GitHub Bot
parent 992e0ce922
commit 1908d50ba4
+1 -1
View File
@@ -8,7 +8,7 @@ case $1 in
"android" | "ios")
GITHUB_OWNER=${CIRCLE_PROJECT_USERNAME:-facebook} \
GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native} \
GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" \
GITHUB_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}" \
GITHUB_REF=${CIRCLE_BRANCH} \
GITHUB_SHA=${CIRCLE_SHA1} \
node bots/report-bundle-size.js "$1"