import { ProbotOctokit } from "probot" ; /**
 * Returns the paths for files that exist in the given pull request.
 * Files that the pull request deletes do not exist anymore.
 */ export async function getExistingFilesInPullRequests ( args ) { const callResult = await args . octokit . pulls . listFiles ( { owner : args . org , pull_number : args . pullRequestNumber , repo : args . repo , } ) ; const result = [ ] ; for ( const file of callResult . data ) { if ( file . status !== "removed" ) { result . push ( file . filename ) ; } } return result ; }