File tree Expand file tree Collapse file tree 1 file changed +6
-11
lines changed
example-github/src/main/java/example/github Expand file tree Collapse file tree 1 file changed +6
-11
lines changed Original file line number Diff line number Diff line change 11/**
2- * Copyright 2012-2019 The Feign Authors
2+ * Copyright 2012-2020 The Feign Authors
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55 * in compliance with the License. You may obtain a copy of the License at
2828 */
2929public class GitHubExample {
3030
31- private static final String GITHUB_TOKEN = "GITHUB_TOKEN" ;
32-
3331 public interface GitHub {
3432
3533 public class Repository {
@@ -81,14 +79,11 @@ static GitHub connect() {
8179 .logger (new Logger .ErrorLogger ())
8280 .logLevel (Logger .Level .BASIC )
8381 .requestInterceptor (template -> {
84- if (System .getenv ().containsKey (GITHUB_TOKEN )) {
85- System .out .println ("Detected Authorization token from environment variable" );
86- template .header (
87- // not available when building PRs...
88- // https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
89- "Authorization" ,
90- "token " + System .getenv (GITHUB_TOKEN ));
91- }
82+ template .header (
83+ // not available when building PRs...
84+ // https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml
85+ "Authorization" ,
86+ "token 383f1c1b474d8f05a21e7964976ab0d403fee071" );
9287 })
9388 .target (GitHub .class , "https://api.github.com" );
9489 }
You can’t perform that action at this time.
0 commit comments