File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 7
7
"net/url"
8
8
"regexp"
9
9
"strings"
10
-
11
- "github.com/sirupsen/logrus"
12
10
)
13
11
14
12
// GitHubGateway acts as a proxy to GitHub
@@ -49,7 +47,9 @@ func director(r *http.Request) {
49
47
if r .Method != http .MethodOptions {
50
48
r .Header .Set ("Authorization" , "Bearer " + accessToken )
51
49
}
52
- logrus .Infof ("Proxying to: %v" , r .URL .String ())
50
+
51
+ log := getLogEntry (r )
52
+ log .Infof ("Proxying to GitHub: %v" , r .URL .String ())
53
53
}
54
54
55
55
func (gh * GitHubGateway ) ServeHTTP (w http.ResponseWriter , r * http.Request ) {
@@ -73,9 +73,9 @@ func (gh *GitHubGateway) ServeHTTP(w http.ResponseWriter, r *http.Request) {
73
73
}
74
74
var apiURL string
75
75
if strings .HasSuffix (endpoint , "/" ) {
76
- apiURL = endpoint + config .GitHub .Repo
76
+ apiURL = endpoint + "repos/" + config .GitHub .Repo
77
77
} else {
78
- apiURL = endpoint + "/" + config .GitHub .Repo
78
+ apiURL = endpoint + "/repos/ " + config .GitHub .Repo
79
79
}
80
80
81
81
target , err := url .Parse (apiURL )
You can’t perform that action at this time.
0 commit comments