mirror of
https://github.com/status-im/react-native.git
synced 2025-01-12 18:44:25 +00:00
Move danger to bots directory
Summary: No logic change here. Part of a plan to consolidate CI-only files amongst .circleci and bots/ directories. Closes https://github.com/facebook/react-native/pull/17807 Differential Revision: D6865976 Pulled By: hramos fbshipit-source-id: 48607a80dcf8cac1c3c033c18bf5d6dd4cd8e6bf
This commit is contained in:
parent
d74ff6fadd
commit
22a2553405
5
.circleci/README.md
Normal file
5
.circleci/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Circle CI
|
||||
|
||||
This directory is home to the Circle CI configuration file. Circle is our continuous integration service provider. You can see the overall status of React Native's builds at https://circleci.com/gh/facebook/react-native
|
||||
|
||||
You may also see an individual PR's build status by scrolling down to the Checks section in the PR.
|
@ -12,14 +12,14 @@ aliases:
|
||||
|
||||
- &restore-cache-analysis
|
||||
keys:
|
||||
- v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
|
||||
- v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "bots/package.json" }}
|
||||
# Fallback in case checksum fails
|
||||
- v1-analysis-dependencies-{{ arch }}-
|
||||
- &save-cache-analysis
|
||||
paths:
|
||||
- danger/node_modules
|
||||
- bots/node_modules
|
||||
- node_modules
|
||||
key: v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "danger/package.json" }}
|
||||
key: v1-analysis-dependencies-{{ arch }}-{{ checksum "package.json" }}{{ checksum "bots/package.json" }}
|
||||
|
||||
- &restore-cache-android-packages
|
||||
keys:
|
||||
@ -455,7 +455,7 @@ jobs:
|
||||
command: |
|
||||
if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
||||
yarn add github@0.2.4
|
||||
cd danger
|
||||
cd bots
|
||||
yarn install --non-interactive --cache-folder ~/.cache/yarn
|
||||
else
|
||||
echo "Skipping dependency installation."
|
||||
@ -465,7 +465,7 @@ jobs:
|
||||
name: Analyze Pull Request
|
||||
command: |
|
||||
if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
||||
cd danger && DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" yarn danger
|
||||
cd bots && DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" yarn danger
|
||||
else
|
||||
echo "Skipping pull request analysis."
|
||||
fi
|
||||
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -36,6 +36,9 @@ buck-out
|
||||
/ReactAndroid/src/main/jni/prebuilt/lib/x86/
|
||||
/ReactAndroid/src/main/gen
|
||||
|
||||
# Watchman
|
||||
.watchmanconfig
|
||||
|
||||
# Android
|
||||
.idea
|
||||
.gradle
|
||||
@ -47,7 +50,8 @@ local.properties
|
||||
node_modules
|
||||
*.log
|
||||
.nvm
|
||||
/danger/node_modules/
|
||||
/bots/node_modules/
|
||||
*/**/yarn.lock
|
||||
|
||||
# OS X
|
||||
.DS_Store
|
||||
|
@ -1 +1,18 @@
|
||||
Github bots and messages used by the Facebook Github bot.
|
||||
GitHub bots, such as the Danger bot, as well as messages used by the Facebook GitHub bot are all configured in this directory/
|
||||
|
||||
## Danger
|
||||
|
||||
We use [Danger JS](http://danger.systems/js/) to perform rudimentary maintenance on the React Native repository.
|
||||
|
||||
If you'd like to make changes to the Dangerfile, find an existing PR on the React Native repo and make note of the URL.
|
||||
|
||||
Then, run from the React Native root directory:
|
||||
|
||||
```
|
||||
cd .circleci
|
||||
npm install
|
||||
..
|
||||
node .circleci/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/1
|
||||
```
|
||||
|
||||
And you will get the responses from parsing the Dangerfile.
|
||||
|
@ -78,7 +78,7 @@ if (!includesReleaseNotes) {
|
||||
|
||||
// Tags PRs that have been submitted by a core contributor.
|
||||
// TODO: Switch to using an actual MAINTAINERS file.
|
||||
const taskforce = fs.readFileSync('../bots/IssueCommands.txt', 'utf8').split('\n')[0].split(':')[1];
|
||||
const taskforce = fs.readFileSync('./IssueCommands.txt', 'utf8').split('\n')[0].split(':')[1];
|
||||
const isSubmittedByTaskforce = includes(taskforce, danger.github.pr.user.login);
|
||||
if (isSubmittedByTaskforce) {
|
||||
markdown('@facebook-github-bot label Core Team');
|
@ -1,12 +0,0 @@
|
||||
If you'd like to make changes to the Dangerfile, find an existing PR and copy the URL.
|
||||
|
||||
Then run from the React Native root:
|
||||
|
||||
```
|
||||
cd danger
|
||||
npm install
|
||||
..
|
||||
node danger/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/1
|
||||
```
|
||||
|
||||
And you will get the responses from parsing the Dangerfile.
|
Loading…
x
Reference in New Issue
Block a user