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

Bring back clobbered hide-prev-commentds fix #1107

Merged
merged 1 commit into from
Jul 9, 2020
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
2 changes: 1 addition & 1 deletion server/events/vcs/github_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func NewGithubClient(hostname string, credentials GithubCredentials, logger *log
if err != nil {
return nil, err
}
graphqlURL = fmt.Sprintf("https://%s/graphql", apiURL.Host)
graphqlURL = fmt.Sprintf("https://%s/api/graphql", apiURL.Host)
}

// shurcooL's githubv4 library has a client ctor, but it doesn't support schema
Expand Down
4 changes: 2 additions & 2 deletions server/events/vcs/github_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func TestGithubClient_PaginatesComments(t *testing.T) {
testServer := httptest.NewTLSServer(
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
switch r.Method + " " + r.RequestURI {
case "POST /graphql":
case "POST /api/graphql":
defer r.Body.Close() // nolint: errcheck
body, err := ioutil.ReadAll(r.Body)
if err != nil {
Expand Down Expand Up @@ -262,7 +262,7 @@ func TestGithubClient_HideOldComments(t *testing.T) {
case "GET /api/v3/repos/owner/repo/issues/123/comments?direction=asc&sort=created":
w.Write([]byte(issueResp)) // nolint: errcheck
return
case "POST /graphql":
case "POST /api/graphql":
if accept, has := r.Header["Accept"]; !has || accept[0] != "application/vnd.github.queen-beryl-preview+json" {
t.Error("missing preview header")
http.Error(w, "bad request", http.StatusBadRequest)
Expand Down