Fix diff-js-api-changes to compare PR head vs merge base#55245
Closed
emily8rown wants to merge 1 commit intofacebook:mainfrom
Closed
Fix diff-js-api-changes to compare PR head vs merge base#55245emily8rown wants to merge 1 commit intofacebook:mainfrom
emily8rown wants to merge 1 commit intofacebook:mainfrom
Conversation
|
@emily8rown has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90978905. |
844bc6e to
f2580e1
Compare
f2580e1 to
97e1447
Compare
) Summary: [INTERNAL] [FIXED] - Fix diff-js-api-changes workflow to correctly compare PR head vs merge base The `diff-js-api-changes` action was comparing main to main instead of comparing the PR head to the point of main it branched from. The workflow now: 1. Checks out main in `danger-pr.yml` to get the trusted scripts 2. Fetches the PR head commit and computes the merge base (the point it branched from main) 3. Extracts the API snapshots from both refs using `git show` to read-only temp files 4. Runs main's diff script to compare the two snapshots **Security notes:** - `git fetch` only downloads git objects, it does not modify the working directory - `git show <sha>:path` extracts a file as read-only data, not executable code - All executed scripts come from main (trusted), PR content is only used as data - The PR's `.d.ts` file is written to a temp directory and passed as input to main's diff script Reviewed By: huntie Differential Revision: D90978905
97e1447 to
f22d835
Compare
|
This pull request has been merged in 3782e93. |
Collaborator
|
This pull request was successfully merged by @emily8rown in 3782e93 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
[INTERNAL] [FIXED] - Fix diff-js-api-changes workflow to correctly compare PR head vs merge base
The
diff-js-api-changesaction was comparing main to main instead of comparing the PR head to the point of main it branched from.The workflow now:
danger-pr.ymlto get the trusted scriptsgit showto read-only temp filesSecurity notes:
git fetchonly downloads git objects, it does not modify the working directorygit show <sha>:pathextracts a file as read-only data, not executable code.d.tsfile is written to a temp directory and passed as input to main's diff scriptDifferential Revision: D90978905