-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
flutter/cocoon
#4368Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-infraOwned by Infrastructure teamOwned by Infrastructure teamtriaged-infraTriaged by Infrastructure teamTriaged by Infrastructure team
Description
Cocoon uses a wrapper around the GitHub REST API that calls "List pull request files":
/// Returns changed files for a [PullRequest].
///
/// See more:
/// * https://developer.github.com/v3/pulls/#list-pull-requests-files
Future<List<String>> listFiles(PullRequest pullRequest) async {
final List<PullRequestFile> files =
await github.pullRequests.listFiles(pullRequest.base!.repo!.slug(), pullRequest.number!).toList();
log.fine('List of files: $files');
return files.map((PullRequestFile file) {
return file.filename!;
}).toList();
}As noted on https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests-files:
Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default.
That is, in our current implementation, which uses listFiles() for a number of things including the implementation of .ci.yaml's runIf, if you change more than roughly 30 files (potentially less if the patches are large), we will erroneously compute what to run/not run.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.Technical debt, code quality, testing, etc.team-infraOwned by Infrastructure teamOwned by Infrastructure teamtriaged-infraTriaged by Infrastructure teamTriaged by Infrastructure team