Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

アクセストークンの指定がない場合に通信失敗する問題の修正 #38

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/app/lib/data/provider/github_access_token.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
// ignore_for_file: do_not_use_environment

import 'package:riverpod_annotation/riverpod_annotation.dart';

part 'github_access_token.g.dart';

const _githubAccessTokenKey = 'GITHUB_ACCESS_TOKEN';

@riverpod
String? gitHubAccessToken(GitHubAccessTokenRef ref) {
// ignore: do_not_use_environment
return const String.fromEnvironment('GITHUB_ACCESS_TOKEN');
return const bool.hasEnvironment(_githubAccessTokenKey)
? const String.fromEnvironment(_githubAccessTokenKey)
: null;
blendthink marked this conversation as resolved.
Show resolved Hide resolved
}
2 changes: 1 addition & 1 deletion apps/app/lib/data/provider/github_access_token.g.dart

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

Loading