mirror of
https://github.com/status-im/react-native.git
synced 2025-01-12 18:44:25 +00:00
Update danger token
Summary: Closes https://github.com/facebook/react-native/pull/18111 Differential Revision: D7099636 Pulled By: hramos fbshipit-source-id: fc95ba83c34e0061c13fb831ea3496d7e8f3793a
This commit is contained in:
parent
b60a727adb
commit
c87d03a8b2
@ -547,8 +547,9 @@ jobs:
|
||||
- run:
|
||||
name: Analyze Pull Request
|
||||
command: |
|
||||
# DANGER_GITHUB_API_TOKEN=Facebook-Open-Source-Bot public_repo access token
|
||||
if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
||||
cd bots && DANGER_GITHUB_API_TOKEN="e622517d9f1136ea8900""07c6373666312cdfaa69" yarn danger
|
||||
cd bots && DANGER_GITHUB_API_TOKEN="b186c9a82bab3b08ec80""c0818117619eec6f281a" yarn danger
|
||||
else
|
||||
echo "Skipping pull request analysis."
|
||||
fi
|
||||
@ -556,6 +557,7 @@ jobs:
|
||||
- run:
|
||||
name: Analyze Code
|
||||
command: |
|
||||
# GITHUB_TOKEN=eslint-bot public_repo access token
|
||||
if [ -n "$CIRCLE_PR_NUMBER" ]; then
|
||||
cat <(echo eslint; yarn --silent lint --format=json; echo flow; yarn --silent flow check --json) | GITHUB_TOKEN="af6ef0d15709bc91d""06a6217a5a826a226fb57b7" CI_USER=$CIRCLE_PROJECT_USERNAME CI_REPO=$CIRCLE_PROJECT_REPONAME PULL_REQUEST_NUMBER=$CIRCLE_PR_NUMBER node bots/code-analysis-bot.js
|
||||
else
|
||||
|
@ -9,10 +9,10 @@ If you'd like to make changes to the Dangerfile, find an existing PR on the Reac
|
||||
Then, run from the React Native root directory:
|
||||
|
||||
```
|
||||
cd .circleci
|
||||
cd bots
|
||||
npm install
|
||||
..
|
||||
node .circleci/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/1
|
||||
node bots/node_modules/.bin/danger pr https://github.com/facebook/react-native/pull/1
|
||||
```
|
||||
|
||||
And you will get the responses from parsing the Dangerfile.
|
||||
|
@ -45,7 +45,7 @@ if (!includesTestPlan) {
|
||||
|
||||
// Regex looks for given categories, types, a file/framework/component, and a message - broken into 4 capture groups
|
||||
const releaseNotesRegex = /\[(ANDROID|CLI|DOCS|GENERAL|INTERNAL|IOS|TVOS|WINDOWS)\]\s*?\[(BREAKING|BUGFIX|ENHANCEMENT|FEATURE|MINOR)\]\s*?\[(.*)\]\s*?\-\s*?(.*)/ig;
|
||||
const includesReleaseNotes = danger.github.pr.body.toLowerCase().includes('release notes');
|
||||
const includesReleaseNotes = danger.github.pr.body && danger.github.pr.body.toLowerCase().includes('release notes');
|
||||
const correctlyFormattedReleaseNotes = releaseNotesRegex.test(danger.github.pr.body);
|
||||
const releaseNotesCaptureGroups = releaseNotesRegex.exec(danger.github.pr.body);
|
||||
|
||||
@ -86,8 +86,7 @@ if (danger.github.pr.additions + danger.github.pr.deletions > bigPRThreshold) {
|
||||
warn(`${title} - <i>${idea}</i>`);
|
||||
|
||||
// markdown('@facebook-github-bot large-pr');
|
||||
}
|
||||
if (danger.git.modified_files + danger.git.added_files + danger.git.deleted_files > bigPRThreshold) {
|
||||
} else if (danger.git.modified_files + danger.git.added_files + danger.git.deleted_files > bigPRThreshold) {
|
||||
const title = ':exclamation: Big PR';
|
||||
const idea = `This PR is extremely unlikely to get reviewed because it touches ${danger.git.modified_files + danger.git.added_files + danger.git.deleted_files} files.`;
|
||||
warn(`${title} - <i>${idea}</i>`);
|
||||
@ -95,15 +94,6 @@ if (danger.git.modified_files + danger.git.added_files + danger.git.deleted_file
|
||||
// markdown('@facebook-github-bot large-pr');
|
||||
}
|
||||
|
||||
// Warns if the bots whitelist file is updated.
|
||||
const issueCommandsFileModified = includes(danger.git.modified_files, 'bots/IssueCommands.txt');
|
||||
if (issueCommandsFileModified) {
|
||||
const title = ':exclamation: Bots';
|
||||
const idea = 'This PR appears to modify the list of people that may issue ' +
|
||||
'commands to the GitHub bot.';
|
||||
warn(`${title} - <i>${idea}</i>`);
|
||||
}
|
||||
|
||||
// Warns if the PR is opened against stable, as commits need to be cherry picked and tagged by a release maintainer.
|
||||
// Fails if the PR is opened against anything other than `master` or `-stable`.
|
||||
const isMergeRefMaster = danger.github.pr.base.ref === 'master';
|
||||
|
Loading…
x
Reference in New Issue
Block a user