File tree Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Expand file tree Collapse file tree 5 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 6161 id: changes
6262 run: |
6363 echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
64- echo " ${{ steps.changes.outputs.changes}}"
64+ echo ${{ steps.changes.outputs.changes}}
6565
Original file line number Diff line number Diff line change 8282 - name: Get changed files
8383 id: changes
8484 run: |
85- echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha } } | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
85+ echo "::set-output name=changes::$(git diff --name-only --diff-filter=ACMRT origin/main origin/${GITHUB_HEAD_REF } | grep 'go.mod\|.go$' | grep -v _test.go$ | xargs)"
8686 release:
8787 runs-on: ubuntu-latest
8888 needs: [release_check]
Original file line number Diff line number Diff line change 99
1010var (
1111 errDataIsUnexpectedTypeOrNil error = fmt.Errorf("unexpected type or nil")
12+ errOptionAlreadySet error = fmt.Errorf("option already set")
1213)
1314
1415func getInvalidJSONData(reason error) error {
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ func QueryOptions(options *option.QueryOptions) Option {
3434 return OptionFunction(func(selector *Selector) error {
3535 if selector.Options == nil {
3636 selector.Options = options
37+ return nil
3738 }
38- return nil
39+ return errOptionAlreadySet
3940 })
4041}
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ func Test_QueryOptions(t *testing.T) {
100100 assert.Nil(t, err)
101101
102102 err = option2.Apply(selector)
103- assert.Nil (t, err)
103+ assert.EqualError (t, err, "option already set" )
104104
105105 assert.Equal(t, input1, selector.Options)
106106 assert.NotEqual(t, input2, selector.Options)
You can’t perform that action at this time.
0 commit comments