File tree Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Expand file tree Collapse file tree 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1
1
## 6.2.1
2
2
- Consolidated utils from src/util.dart into src/common/utils/utils.dart
3
+ - Added a new top level entry point ` hooks.dart ` to improve dartdocs and IDE usability when writing hooks
3
4
4
5
## 6.2.0
5
6
- Added Checks API https://github.com/SpinlockLabs/github.dart/pull/182
Original file line number Diff line number Diff line change
1
+ /// This entrypoint is here so that dartdoc will generate documentation for
2
+ /// files under lib/src/server. This is only necessary because conditional
3
+ /// import/export isn't well supported in the Dart ecosystem.
4
+ ///
5
+ /// Add this import if you are in a non-web environment and writing something
6
+ /// that uses github hooks. For more information, see github hooks documentation
7
+ /// https://developer.github.com/v3/repos/hooks/
8
+ /// `import 'pacakge:github/hooks.dart';`
9
+ library hooks;
10
+
11
+ export 'src/server/xplat_server.dart' ;
Original file line number Diff line number Diff line change 1
1
import 'package:github/src/common.dart' ;
2
2
3
+ /// Looks for GitHub Authentication information from the current environment.
4
+ ///
5
+ /// If in a browser context, it will look through query string parameters first
6
+ /// and then sessionStorage.
7
+ ///
8
+ /// If in a server, command line or Flutter context it will use the system environment variables.
9
+ ///
10
+ /// In both contexts it delegates to [findAuthenticationInMap] to find the
11
+ /// github token or username and password.
3
12
Authentication findAuthenticationFromEnvironment () =>
4
13
Authentication .anonymous ();
5
14
15
+ /// Checks the passed in map for keys in [COMMON_GITHUB_TOKEN_ENV_KEYS] .
16
+ /// The first one that exists is used as the github token to call [Authentication.withToken] with.
17
+ /// If the above fails, the GITHUB_USERNAME and GITHUB_PASSWORD keys will be checked.
18
+ /// If those keys both exist, then [Authentication.basic] will be used.
6
19
Authentication findAuthenticationInMap (Map map) {
7
20
for (final key in COMMON_GITHUB_TOKEN_ENV_KEYS ) {
8
21
if (map.containsKey (key)) {
You can’t perform that action at this time.
0 commit comments