-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #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
- Loading branch information
1 parent
da961f4
commit 665b5be
Showing
3 changed files
with
24 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
name: Run Danger on PR | ||
|
||
on: | ||
pull_request: | ||
pull_request_target: | ||
types: [opened, edited, reopened, synchronize] | ||
|
||
permissions: | ||
contents: read | ||
actions: write | ||
checks: write | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
statuses: write | ||
|
||
jobs: | ||
danger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: yarn install | ||
- name: Run Yarn Install on Root | ||
run: yarn install | ||
working-directory: . | ||
- run: yarn install | ||
- name: Run Yarn Install inside Bots | ||
run: yarn install | ||
working-directory: bots | ||
- name: Danger | ||
run: DANGER_GITHUB_API_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" yarn danger ci --use-github-checks --failOnErrors --id danger_pr | ||
run: yarn danger ci --use-github-checks --failOnErrors | ||
working-directory: bots | ||
env: | ||
PUBLIC_PULLBOT_GITHUB_TOKEN_A: a6edf8e8d40ce4e8b11a | ||
PUBLIC_PULLBOT_GITHUB_TOKEN_B: 150e1341f4dd9c944d2a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters