diff --git a/.github/actions/lint/action.yml b/.github/actions/lint/action.yml index 667b990029b..e914b6557b9 100644 --- a/.github/actions/lint/action.yml +++ b/.github/actions/lint/action.yml @@ -23,6 +23,7 @@ runs: run: yarn lint-ci env: GITHUB_TOKEN: ${{ inputs.github-token }} + GITHUB_PR_NUMBER: ${{ github.event.number }} - name: Lint code shell: bash run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml diff --git a/scripts/circleci/analyze_code.sh b/scripts/circleci/analyze_code.sh index 96e42352155..8d4bb9d2561 100755 --- a/scripts/circleci/analyze_code.sh +++ b/scripts/circleci/analyze_code.sh @@ -9,7 +9,7 @@ GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native} export GITHUB_OWNER export GITHUB_REPO -cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow-check --silent --json; echo flow; echo google-java-format; node scripts/lint-java.js --diff) | GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" node packages/react-native-bots/code-analysis-bot.js +cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow-check --silent --json; echo google-java-format; node scripts/lint-java.js --diff) | node packages/react-native-bots/code-analysis-bot.js STATUS=$? if [ $STATUS == 0 ]; then