mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
6d61899fc5
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: https://github.com/facebook/react-native/pull/46548 Test Plan: Tested locally and in CI Reviewed By: NickGerleman Differential Revision: D62883758 Pulled By: cipolleschi fbshipit-source-id: 0c7e97ea9caf4465972424e0b69a899ecfd07095
20 lines
690 B
Bash
Executable File
20 lines
690 B
Bash
Executable File
#!/bin/bash
|
|
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
GITHUB_OWNER=${CIRCLE_PROJECT_USERNAME:-facebook}
|
|
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 google-java-format; node scripts/lint-java.js --diff) | node packages/react-native-bots/code-analysis-bot.js
|
|
|
|
STATUS=$?
|
|
if [ $STATUS == 0 ]; then
|
|
echo "Code analyzed successfully."
|
|
else
|
|
echo "Code analysis failed, error status $STATUS."
|
|
fi
|