Skip to content

Commit 9f02316

Browse files
authored
Fix ordering of installation ID middleware (#17)
This must come first in the stack so that the value is available to the metrics middleware added by users.
1 parent 91e10a9 commit 9f02316

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

githubapp/client_creator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ func (c *clientCreator) NewTokenV4Client(token string) (*githubv4.Client, error)
252252
}
253253

254254
func (c *clientCreator) newClient(base *http.Client, middleware []ClientMiddleware, details string, installID int64) (*github.Client, error) {
255-
middleware = append(middleware, setInstallationID(installID))
255+
middleware = append([]ClientMiddleware{setInstallationID(installID)}, middleware...)
256256
applyMiddleware(base, middleware)
257257

258258
baseURL, err := url.Parse(c.v3BaseURL)

0 commit comments

Comments
 (0)