File tree Expand file tree Collapse file tree 3 files changed +78
-2
lines changed
internal/clientcredentials Expand file tree Collapse file tree 3 files changed +78
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+
12
+ permissions :
13
+ contents : write
14
+
15
+ steps :
16
+ - name : Checkout Code
17
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18
+ with :
19
+ token : ${{ secrets.GITHUB_TOKEN }}
20
+
21
+ - id : conventionalcommits
22
+ name : Conventional Commits
23
+ uses : TriPSs/conventional-changelog-action@67139193614f5b9e8db87da1bd4240922b34d765 # v6.0.0
24
+ with :
25
+ github-token : ${{ secrets.GITHUB_TOKEN }}
26
+ skip-commit : " true"
27
+ output-file : " false"
28
+ create-summary : true
29
+ preset : conventionalcommits
30
+
31
+ - name : Create Release
32
+ uses : actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4
33
+ env :
34
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
35
+ with :
36
+ tag_name : ${{ steps.conventionalcommits.outputs.tag }}
37
+ release_name : ${{ steps.conventionalcommits.outputs.tag }}
38
+ body : ${{ steps.conventionalcommits.outputs.clean_changelog }}
Original file line number Diff line number Diff line change
1
+ name : Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - main
7
+ types :
8
+ - opened
9
+ - edited
10
+ - synchronize
11
+ - reopened
12
+
13
+ jobs :
14
+ build :
15
+ name : Conventional pull request names
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
19
+ - uses : amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
20
+ env :
21
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
22
+ build-test :
23
+ name : Build & Test
24
+ if : ${{ github.event.pull_request.draft == false }}
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
28
+ with :
29
+ submodules : true
30
+ - name : Set up Go
31
+ uses : actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
32
+ with :
33
+ go-version-file : " go.mod"
34
+ - name : Set up gotestfmt
35
+ run : go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
36
+ - name : Build
37
+ run : go build ./...
38
+ - run : go test -json -v -p 1 ./... | gotestfmt
Original file line number Diff line number Diff line change @@ -87,11 +87,11 @@ func TestHandleTokenRequest(t *testing.T) {
87
87
wantStatus : http .StatusUnauthorized ,
88
88
},
89
89
{
90
- name : "missing required scope in basic auth" ,
90
+ name : "unexpected scope in basic auth" ,
91
91
setupRequest : func () * http.Request {
92
92
form := url.Values {}
93
93
form .Set ("grant_type" , "client_credentials" )
94
- form .Set ("scope" , "read " ) // missing write scope
94
+ form .Set ("scope" , "unknown " ) // missing write scope
95
95
96
96
req := httptest .NewRequest (http .MethodPost , "/token" , strings .NewReader (form .Encode ()))
97
97
req .Header .Set ("Content-Type" , "application/x-www-form-urlencoded" )
You can’t perform that action at this time.
0 commit comments