mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
b41b924b2d
Summary: This PR connects breaking change detection with a danger bot. The action takes snapshot from main branch and from the PR as inputs to`diff-api-snapshot` (saved in runner temp directory). ## Changelog: [Internal] For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests Pull Request resolved: https://github.com/facebook/react-native/pull/52045 Reviewed By: huntie Differential Revision: D76735630 Pulled By: coado fbshipit-source-id: 9208117340c1e0bf10d58b67892727717d22e62f
24 lines
955 B
YAML
24 lines
955 B
YAML
name: diff-js-api-breaking-changes
|
|
description: Check for breaking changes in the public React Native JS API
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Fetch snapshot from PR head
|
|
shell: bash
|
|
env:
|
|
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
|
|
run: |
|
|
mkdir $SCRATCH_DIR
|
|
git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
|
|
git show ${{ github.event.pull_request.head.sha }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-after.d.ts \
|
|
|| echo "" > $SCRATCH_DIR/ReactNativeApi.d.ts
|
|
- name: Run breaking change detection
|
|
shell: bash
|
|
env:
|
|
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
|
|
run: |
|
|
node ./scripts/diff-api-snapshot \
|
|
${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \
|
|
$SCRATCH_DIR/ReactNativeApi-after.d.ts \
|
|
> $SCRATCH_DIR/output.json
|