Skip to content

Commit

Permalink
Merge branch 'flutter:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoamador authored Jan 22, 2024
2 parents 5877b5e + bff6c57 commit b10b508
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6
with:
name: SARIF file
path: results.sarif
Expand Down
2 changes: 1 addition & 1 deletion app_dart/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


# Dart Docker official images can be found here: https://hub.docker.com/_/dart
FROM dart:beta@sha256:ee8c9ecca537d9989d1831c0fbfd76bc378e3c9184319d4125121bae061d268a
FROM dart:beta@sha256:2f070e827e9a7bee4270d6a375462d4db38bf47528dae04eff68868b2fdaaaa8

WORKDIR /app

Expand Down
19 changes: 16 additions & 3 deletions app_dart/lib/src/service/luci_build_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ class LuciBuildService {
final Map<String, Object> properties = target.getProperties();
properties.putIfAbsent('git_branch', () => pullRequest.base!.ref!.replaceAll('refs/heads/', ''));

final List<String>? labels = extractPrefixedLabels(pullRequest.labels, githubBuildLabelPrefix);

if (labels != null && labels.isNotEmpty) {
properties[propertiesGithubBuildLabelName] = labels;
}

requests.add(
Request(
scheduleBuild: _createPresubmitScheduleBuild(
Expand Down Expand Up @@ -357,11 +363,11 @@ class LuciBuildService {
};
final Map<String, Object> properties = Map.of(build.input!.properties ?? <String, Object>{});
final GithubService githubService = await config.createGithubService(slug);

final List<github.IssueLabel> issueLabels = await githubService.getIssueLabels(slug, prNumber);
final List<String> labels =
issueLabels.where((label) => label.name.startsWith(githubBuildLabelPrefix)).map((obj) => obj.name).toList();
final List<String>? labels = extractPrefixedLabels(issueLabels, githubBuildLabelPrefix);

if (labels.isNotEmpty) {
if (labels != null && labels.isNotEmpty) {
properties[propertiesGithubBuildLabelName] = labels;
}
log.info('input ${build.input!} properties $properties');
Expand All @@ -382,6 +388,13 @@ class LuciBuildService {
return scheduleBuild;
}

/// Collect any label whose name is prefixed by the prefix [String].
///
/// Returns a [List] of prefixed label names as [String]s.
List<String>? extractPrefixedLabels(List<github.IssueLabel>? issueLabels, String prefix) {
return issueLabels?.where((label) => label.name.startsWith(prefix)).map((obj) => obj.name).toList();
}

/// Sends postsubmit [ScheduleBuildRequest] for a commit using [checkRunEvent], [Commit], [Task], and [Target].
///
/// Returns the [Build] returned by scheduleBuildRequest.
Expand Down
4 changes: 2 additions & 2 deletions app_dart/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ dependencies:
fixnum: 1.1.0
gcloud: 0.8.12
github: 9.22.0
googleapis: 11.4.0
googleapis: 12.0.0
googleapis_auth: 1.4.1
gql: 1.0.1-alpha+1696717343881
graphql: 5.2.0-beta.7
grpc: 3.2.4
http: 1.1.2
http: 1.2.0
json_annotation: 4.8.1
logging: 1.2.0
meta: 1.11.0
Expand Down
2 changes: 1 addition & 1 deletion auto_submit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


# Dart Docker official images can be found here: https://hub.docker.com/_/dart
FROM dart:beta@sha256:ee8c9ecca537d9989d1831c0fbfd76bc378e3c9184319d4125121bae061d268a
FROM dart:beta@sha256:2f070e827e9a7bee4270d6a375462d4db38bf47528dae04eff68868b2fdaaaa8

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion auto_submit/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies:
googleapis_auth: 1.4.1
graphql: 5.2.0-beta.7
gql: 1.0.1-alpha+1691943394579
http: 1.1.2
http: 1.2.0
json_annotation: 4.8.1
meta: 1.11.0
neat_cache: 2.0.3
Expand Down
2 changes: 1 addition & 1 deletion cipd_packages/codesign/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ dependencies:
flutter_lints: 3.0.1
logging: 1.2.0
meta: 1.11.0
platform: 3.1.3
platform: 3.1.4
process: 5.0.2
retry: 3.1.2
6 changes: 3 additions & 3 deletions dashboard/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ dependencies:
google_sign_in: 6.2.1 # Rolled by dependabot
google_sign_in_platform_interface: any # Match google_sign_in
google_sign_in_web: 0.12.3 # Rolled by dependabot
http: 1.1.2 # Rolled by dependabot
http: 1.2.0 # Rolled by dependabot
protobuf: 3.1.0 # Rolled by dependabot
provider: 6.1.1 # Rolled by dependabot
truncate: 3.0.1 # Rolled by dependabot
url_launcher: 6.2.2 # Rolled by dependabot
url_launcher: 6.2.3 # Rolled by dependabot
url_launcher_platform_interface: 2.3.1 # Rolled by dependabot
url_launcher_web: 2.2.2 # Rolled by dependabot
url_launcher_web: 2.2.3 # Rolled by dependabot

dev_dependencies:
flutter_test:
Expand Down
44 changes: 22 additions & 22 deletions gh_actions/third_party/no-response/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions gh_actions/third_party/no-response/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"devDependencies": {
"@octokit/webhooks-types": "^7.3.1",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.7",
"@types/node": "^20.11.5",
"@typescript-eslint/parser": "^6.18.1",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.56.0",
Expand All @@ -42,8 +42,8 @@
"extract-pr-titles": "^1.1.0",
"jest": "^29.7.0",
"js-yaml": "^4.1.0",
"prettier": "3.2.2",
"ts-jest": "^29.1.1",
"prettier": "3.2.4",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
}
}

0 comments on commit b10b508

Please sign in to comment.