react-native-macos/bots
Nicola Corti 665b5bedd3 Let danger run on `pull_request_target` (#34370)
Summary:
This is a nit. Did some cleanups on our Danger setup.
The most substantial work is:
- Moved over danger to run on `pull_request_target`. This allow us to re-use the Github Action access token without having to provide one.
- Fixed an issue with the `Pick Request` label which was not applied correctly.
- Removed the danger_id as we were not passing it correctly.

## Changelog

[Internal] - Let danger run on `pull_request_target`

Pull Request resolved: https://github.com/facebook/react-native/pull/34370

Test Plan: Tested locally with `yarn danger pr https://github.com/facebook/react-native/pull/34197`

Reviewed By: cipolleschi

Differential Revision: D38533144

Pulled By: cortinico

fbshipit-source-id: 178ce411eb956870563c4d51719ed4dae1f1536d
2022-08-09 06:34:32 -07:00
..
.babelrc Move danger to bots directory 2018-01-31 16:42:41 -08:00
README.md Let danger run on `pull_request_target` (#34370) 2022-08-09 06:34:32 -07:00
code-analysis-bot.js Updates octokit package and adds userAgent header to code analysis bot (#32891) 2022-01-26 11:24:32 -08:00
dangerfile.js Let danger run on `pull_request_target` (#34370) 2022-08-09 06:34:32 -07:00
datastore.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
make-comment.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
package.json Run ESLint in Danger (#34305) 2022-08-02 06:53:35 -07:00
post-artifacts-link.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
report-bundle-size.js Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
yarn.lock Run ESLint in Danger (#34305) 2022-08-02 06:53:35 -07:00

README.md

Danger

Danger is a JavaScript runtime which helps you provide continuous feedback inside GitHub. It's used inside Github Actions to analyze the contents of a GitHub pull request.

If you want to test changes to Danger, I'd recommend checking out an existing PR and then running the danger pr command. You'll need a GitHub Public Access Token (PAT). It will look like ghp_<REDACTED>.

So, for example:

DANGER_GITHUB_API_TOKEN=ghp_<REDACTED> yarn danger pr https://github.com/facebook/react-native/pull/1234

Code Analysis Bot

The code analysis bot provides lint and other results as inline reviews on GitHub. It runs as part of the Circle CI analysis workflow.

If you want to test changes to the Code Analysis Bot, I'd recommend checking out an existing PR and then running the analyze pr command. You'll need a GitHub token. You can re-use this one: 312d354b5c36f082cfe9 07973d757026bdd9f196 (just remove the space). So, for example:

GITHUB_TOKEN=[ENV_ABOVE] GITHUB_PR_NUMBER=1234 yarn lint-ci