Skip to content

Commit

Permalink
[dashboard] Show release branches regardless of repo (#3093)
Browse files Browse the repository at this point in the history
Fixes flutter/flutter#133622

Release branches are generic to the repos. Remove the legacy check for the specific repo, which is no longer returned.

Updated the fake data to properly reflect the expected state.
  • Loading branch information
Casey Hillers authored Sep 19, 2023
1 parent 31f6f44 commit 031dfa5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion dashboard/lib/build_dashboard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ class BuildDashboardPageState extends State<BuildDashboardPage> {
),
),
...buildState.branches
.where((Branch b) => b.repository == buildState.currentRepo && b.branch != buildState.currentBranch)
.where((Branch b) => b.branch != buildState.currentBranch)
.map<DropdownMenuItem<String>>((Branch b) {
final String branchPrefix = (b.channel != 'HEAD') ? '${b.channel}: ' : '';
return DropdownMenuItem<String>(
Expand Down
1 change: 0 additions & 1 deletion dashboard/lib/logic/qualified_task.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class StageName {
}

/// Base URLs for various endpoints that can relate to a [Task].
const String _cirrusUrl = 'https://cirrus-ci.com/github/flutter/flutter';
const String _luciUrl = 'https://ci.chromium.org/p/flutter';
const String _googleTestUrl = 'https://flutter-rob.corp.google.com';
const String _dartInternalUrl = 'https://ci.chromium.org/p/dart-internal';
Expand Down
27 changes: 14 additions & 13 deletions dashboard/lib/service/dev_cocoon.dart
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,20 @@ class DevelopmentCocoonService implements CocoonService {

@override
Future<CocoonResponse<List<Branch>>> fetchFlutterBranches() async {
final List<Branch> fakeBranches = <Branch>[];
for (String repo in _repos) {
fakeBranches.add(
Branch()
..repository = repo
..branch = defaultBranches[repo]!,
);
fakeBranches.add(
Branch()
..repository = repo
..branch = '$repo-release',
);
}
final List<Branch> fakeBranches = <Branch>[
Branch()
..channel = 'HEAD'
..branch = 'master',
Branch()
..channel = 'stable'
..branch = 'flutter-3.13-candidate.0',
Branch()
..channel = 'beta'
..branch = 'flutter-3.15-candidate.5',
Branch()
..channel = 'dev'
..branch = 'flutter-3.15-candidate.12',
];
return CocoonResponse<List<Branch>>.data(fakeBranches);
}

Expand Down

0 comments on commit 031dfa5

Please sign in to comment.