Skip to content

Commit

Permalink
Merge pull request #1 from github-release/master
Browse files Browse the repository at this point in the history
Update from upstream
  • Loading branch information
chrmod authored Jan 18, 2021
2 parents a2845f0 + 100e855 commit 5c75e17
Show file tree
Hide file tree
Showing 371 changed files with 67 additions and 166,580 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.13.x, 1.14.x]
go-version: [1.13.x, 1.14.x, 1.15.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
Expand All @@ -16,8 +16,8 @@ jobs:
with:
path: './src/github.com/github-release/github-release'
# staticcheck needs this for GOPATH
- run: echo "::set-env name=GOPATH::$GITHUB_WORKSPACE"
- run: echo "::set-env name=PATH::$GITHUB_WORKSPACE/bin:$PATH"
- run: echo "GOPATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- run: echo "PATH=$GITHUB_WORKSPACE/bin:$PATH" >> $GITHUB_ENV
- name: Run tests
run: make lint test
working-directory: './src/github.com/github-release/github-release'
56 changes: 8 additions & 48 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[[constraint]]
name = "github.com/kevinburke/rest"
version = "2.2.0"
version = "2.5.0"

[[constraint]]
name = "github.com/tomnomnom/linkheader"
Expand Down
14 changes: 7 additions & 7 deletions github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"reflect"

"github.com/kevinburke/rest"
"github.com/kevinburke/rest/restclient"
"github.com/tomnomnom/linkheader"
)

Expand Down Expand Up @@ -42,14 +42,14 @@ func DoAuthRequest(method, url, mime, token string, headers map[string]string, b
// API, such as authorization tokens. Methods called on Client will supply
// these options when calling the API.
type Client struct {
client *rest.Client
client *restclient.Client
}

// NewClient creates a new Client for use with the Github API.
func NewClient(username, token string, client *rest.Client) Client {
func NewClient(username, token string, client *restclient.Client) Client {
c := Client{}
if client == nil {
c.client = rest.NewClient(username, token, DefaultBaseURL)
c.client = restclient.New(username, token, DefaultBaseURL)
} else {
c.client = client
}
Expand Down Expand Up @@ -153,7 +153,7 @@ var defaultHttpClient *http.Client

func init() {
defaultHttpClient = &http.Client{
Transport: rest.DefaultTransport,
Transport: restclient.DefaultTransport,
}
}

Expand All @@ -176,7 +176,7 @@ func (c Client) Do(r *http.Request) (*http.Response, error) {
if c.client.ErrorParser != nil {
return nil, c.client.ErrorParser(res)
}
return nil, rest.DefaultErrorParser(res)
return nil, restclient.DefaultErrorParser(res)
}
return res, nil
}
Expand Down Expand Up @@ -283,7 +283,7 @@ func (c Client) getPaginated(uri string) (io.ReadCloser, error) {
for resp := range responses {
if resp.StatusCode != http.StatusOK {
resp.Body.Close()
w.CloseWithError(fmt.Errorf("expected '200 OK' but received '%v' (url: %s)", resp.Status, resp.Request.URL))
w.CloseWithError(fmt.Errorf("expected '200 OK' but received '%v' (%s to %s)", resp.Status, resp.Request.Method, resp.Request.URL.Path))
return
}
_, err := io.Copy(w, resp.Body)
Expand Down
2 changes: 1 addition & 1 deletion github/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package github

const VERSION = "0.8.1"
const VERSION = "0.10.0"
15 changes: 0 additions & 15 deletions vendor/github.com/go-stack/stack/.travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/go-stack/stack/LICENSE.md

This file was deleted.

38 changes: 0 additions & 38 deletions vendor/github.com/go-stack/stack/README.md

This file was deleted.

1 change: 0 additions & 1 deletion vendor/github.com/go-stack/stack/go.mod

This file was deleted.

Loading

0 comments on commit 5c75e17

Please sign in to comment.