Skip to content

Commit 6d61899

Browse files
cipolleschifacebook-github-bot
authored andcommitted
Fix analyze_code to use the proper PR number (facebook#46548)
Summary: Analyze code was still using the CIRCLECI env variable to retrieve the PR number. This change uses the github one and also removes a duplicated flow check ## Changelog: [Internal] - Remove duplicated flow check and use gh PR number rather than CircleCI one Pull Request resolved: facebook#46548 Test Plan: Tested locally and in CI Reviewed By: NickGerleman Differential Revision: D62883758 Pulled By: cipolleschi fbshipit-source-id: 0c7e97ea9caf4465972424e0b69a899ecfd07095
1 parent 405d982 commit 6d61899

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/actions/lint/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ runs:
2323
run: yarn lint-ci
2424
env:
2525
GITHUB_TOKEN: ${{ inputs.github-token }}
26+
GITHUB_PR_NUMBER: ${{ github.event.number }}
2627
- name: Lint code
2728
shell: bash
2829
run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml

scripts/circleci/analyze_code.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ GITHUB_REPO=${CIRCLE_PROJECT_REPONAME:-react-native}
99
export GITHUB_OWNER
1010
export GITHUB_REPO
1111

12-
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
12+
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
1313

1414
STATUS=$?
1515
if [ $STATUS == 0 ]; then

0 commit comments

Comments
 (0)