mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
44878ea9bc
Summary: The code analysis script takes the results of `eslint .` and filters out any messages for filepaths outside of what is modified in a given pull request. This diff fixes an issue where the bot will fail to post warnings if a pull request contains multiple commits, where the most recent commit is a rebase (e.g. https://github.com/facebook/react-native/pull/22470/commits/63c00f20a7f43db436f061c478b12a4f9aa2bd5a in https://github.com/facebook/react-native/pull/22470). This happens because the script looks for files changed in the most recent commit in a PR. In this diff, we switch to a new GitHub API that returns the list of all files changed by a PR, obviating the need to go through individual commits in a PR to look for changed files. Reviewed By: TheSavior Differential Revision: D13324154 fbshipit-source-id: f9f50028439d1969b0feea65f0b3e8bf75ac1a33