Skip to content

Commit 7c810a5

Browse files
committed
Hardcode a github token for more stable testing
1 parent 69ab9c7 commit 7c810a5

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

example-github/src/main/java/example/github/GitHubExample.java

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
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
@@ -28,8 +28,6 @@
2828
*/
2929
public 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
}

0 commit comments

Comments
 (0)