Skip to content

Commit

Permalink
introduce test and lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAbides committed Sep 15, 2023
1 parent b2b507e commit 0fe0ba8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
5 changes: 1 addition & 4 deletions example/actionpermissions/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ func main() {
fmt.Printf("Current ActionsPermissions %s\n", actionsPermissionsRepository.String())

actionsPermissionsRepository = &github.ActionsPermissionsRepository{Enabled: github.Bool(true), AllowedActions: github.String("selected")}
_, _, err = client.Repositories.EditActionsPermissions(ctx, *owner, *name, *actionsPermissionsRepository)
if err != nil {
log.Fatal(err)
}
_, _, _ = client.Repositories.EditActionsPermissions(ctx, *owner, *name, *actionsPermissionsRepository)

Check failure on line 48 in example/actionpermissions/main.go

View workflow job for this annotation

GitHub Actions / lint

declaration has 3 blank identifiers (dogsled)

Check failure on line 48 in example/actionpermissions/main.go

View workflow job for this annotation

GitHub Actions / lint

declaration has 3 blank identifiers (dogsled)

fmt.Printf("Current ActionsPermissions %s\n", actionsPermissionsRepository.String())

Expand Down
2 changes: 1 addition & 1 deletion example/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/google/go-github/v55/example

go 1.17
go 1.17

require (
github.com/bradleyfalzon/ghinstallation/v2 v2.0.4
Expand Down
3 changes: 0 additions & 3 deletions github/actions_artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ type ArtifactList struct {
func (s *ActionsService) ListArtifacts(ctx context.Context, owner, repo string, opts *ListOptions) (*ArtifactList, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/actions/artifacts", owner, repo)
u, err := addOptions(u, opts)

Check failure on line 58 in github/actions_artifacts.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to err (ineffassign)

Check failure on line 58 in github/actions_artifacts.go

View workflow job for this annotation

GitHub Actions / lint

ineffectual assignment to err (ineffassign)
if err != nil {
return nil, nil, err
}

req, err := s.client.NewRequest("GET", u, nil)
if err != nil {
Expand Down
4 changes: 4 additions & 0 deletions github/actions_artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import (
"github.com/google/go-cmp/cmp"
)

func TestFail(t *testing.T) {
t.Errorf("This test fails")
}

func TestActionsService_ListArtifacts(t *testing.T) {
client, mux, _, teardown := setup()
defer teardown()
Expand Down
4 changes: 4 additions & 0 deletions update-urls/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import (
"github.com/pmezard/go-difflib/difflib"
)

func TestFail(t *testing.T) {
t.Errorf("This test fails")
}

type pipelineSetup struct {
// Fields filled in by the unit test:
baseURL string
Expand Down

0 comments on commit 0fe0ba8

Please sign in to comment.