From 1db2e5da4edec9c14e9c6bc23560a2376cf308de Mon Sep 17 00:00:00 2001 From: Simon Fuhrer Date: Sat, 13 Jun 2020 11:45:23 +0200 Subject: [PATCH] add releases --- .github/labels.yml | 28 +++++++++++++++++++++++++++ .github/release-drafter.yml | 20 +++++++++++++++++++ .github/workflows/label-sync.yml | 17 ++++++++++++++++ .github/workflows/release-drafter.yml | 16 +++++++++++++++ client.go | 16 --------------- go.mod | 5 +---- go.sum | 23 ---------------------- 7 files changed, 82 insertions(+), 43 deletions(-) create mode 100644 .github/labels.yml create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/label-sync.yml create mode 100644 .github/workflows/release-drafter.yml diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..adb4c04 --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,28 @@ +- name: added-feature + description: for new features in the changelog. + color: a2eeef +- name: changed + description: for changes in existing functionality in the changelog. + color: a2eeef +- name: deprecated + description: for soon-to-be removed features in the changelog. + color: e4e669 +- name: removed + description: for now removed features in the changelog. + color: e4e669 +- name: bugfix + description: for any bug fixes in the changelog. + color: d73a4a +- name: security + description: for vulnerabilities in the changelog. + color: dd4739 +- name: bug + description: Something isn't working in this issue. + color: d73a4a +- name: enhancement + description: New feature request in this issue. + color: a2eeef +- name: good first issue + description: Low hanging fruit. + color: 7057ff + diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..e4c41e0 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,20 @@ +name-template: 'v$NEXT_PATCH_VERSION' +tag-template: 'v$NEXT_PATCH_VERSION' +categories: + - title: '🚀 Added' + label: 'added-feature' + - title: '🧰 Changed' + label: 'changed' + - title: "⚠️ Deprecated" + label: "deprecated" + - title: "⚠️ Removed" + label: "removed" + - title: '🐛 Bug Fixes' + label: 'bugfix' + - title: "⚠️ Security" + label: "security" +change-template: '- $TITLE @$AUTHOR (#$NUMBER)' +no-changes-template: "- No changes" +template: | + ## Changes + $CHANGES diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml new file mode 100644 index 0000000..975bdb8 --- /dev/null +++ b/.github/workflows/label-sync.yml @@ -0,0 +1,17 @@ +name: Sync labels +on: + push: + branches: + - master + paths: + - .github/labels.yml +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: micnncim/action-label-syncer@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + manifest: .github/labels.yml diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml new file mode 100644 index 0000000..d084309 --- /dev/null +++ b/.github/workflows/release-drafter.yml @@ -0,0 +1,16 @@ +name: Release Drafter + +on: + push: + branches: + - master + +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/client.go b/client.go index f01fbe4..28cca92 100644 --- a/client.go +++ b/client.go @@ -13,7 +13,6 @@ import ( "reflect" "strings" - "github.com/sirupsen/logrus" "github.com/tecbiz-ch/nutanix-go-sdk/schema" ) @@ -138,11 +137,6 @@ func (c *Client) Do(r *http.Request, v interface{}) error { } func checkResponse(r *http.Response) error { - logrus.WithFields(logrus.Fields{ - "status": r.StatusCode, - "url": r.Request.URL, - }).Trace("Response") - if c := r.StatusCode; c >= 200 && c <= 299 && r.Request.Method == http.MethodDelete { return nil } @@ -261,11 +255,6 @@ func (c *Client) newV3Request(ctx context.Context, method string, url *url.URL, req = req.WithContext(ctx) - logrus.WithFields(logrus.Fields{ - "url": req.URL, - "method": req.Method, - }).Trace("newV3Request") - return req, nil } @@ -306,11 +295,6 @@ func (c *Client) newV2Request(ctx context.Context, method string, url *url.URL, req = req.WithContext(ctx) - logrus.WithFields(logrus.Fields{ - "url": req.URL, - "method": req.Method, - }).Trace("NewV2Request") - return req, nil } diff --git a/go.mod b/go.mod index 0515c66..6c3db99 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,4 @@ module github.com/tecbiz-ch/nutanix-go-sdk go 1.14 -require ( - github.com/google/uuid v1.1.1 - github.com/sirupsen/logrus v1.6.0 -) +require github.com/google/uuid v1.1.1 diff --git a/go.sum b/go.sum index 5b8728c..b864886 100644 --- a/go.sum +++ b/go.sum @@ -1,25 +1,2 @@ -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88 h1:uC1QfSlInpQF+M0ao65imhwqKnz3Q2z/d8PWZRMQvDM= -github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/k0kubun/pp v3.0.1+incompatible h1:3tqvf7QgUnZ5tXO6pNAZlrvHgl6DvifjDrd9g2S9Z40= -github.com/k0kubun/pp v3.0.1+incompatible/go.mod h1:GWse8YhT0p8pT4ir3ZgBbfZild3tgzSScAn6HmfYukg= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae h1:/WDfKMnPU+m5M4xB+6x4kaepxRw6jWvR5iDRdvjHgy8= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=