Skip to content

Commit

Permalink
proxy github
Browse files Browse the repository at this point in the history
  • Loading branch information
jacopocarlini committed Oct 15, 2024
1 parent 78e5f3e commit 23ecfc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/bloc/versions/app_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class AppCubit extends Cubit<AppState> {

Future<void> addRepo(project) async {
var parser = await Chaleno()
.load('https://github.com/pagopa/${project['repository']}');
.load('${apim_u}/shared/statuspage/v1/github/pagopa/${project['repository']}');
List<Result>? results = parser?.getElementsByClassName(
'css-truncate css-truncate-target text-bold mr-2');
var version = results?.first.text ?? 'ERROR';
Expand Down
16 changes: 12 additions & 4 deletions lib/bloc/versions/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ class AppState {
Map<String, String>? prodVersion,
}) {
return AppState(
repoVersion: repoVersion ?? this.repoVersion,
devVersion: devVersion ?? this.devVersion,
uatVersion: uatVersion ?? this.uatVersion,
prodVersion: prodVersion ?? this.prodVersion,
repoVersion: repoVersion != null
? Map<String, String>.from(repoVersion)
: this.repoVersion,
devVersion: devVersion != null
? Map<String, String>.from(devVersion)
: this.devVersion,
uatVersion: uatVersion != null
? Map<String, String>.from(uatVersion)
: this.uatVersion,
prodVersion: prodVersion != null
? Map<String, String>.from(prodVersion)
: this.prodVersion,
);
}
}

0 comments on commit 23ecfc0

Please sign in to comment.