Skip to content

Commit

Permalink
chore: Check and fix license headers (#3449)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Jan 23, 2025
1 parent 07b0446 commit fb972ef
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 9 deletions.
12 changes: 11 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ linters:
- gocritic
- godot
- gofmt
- goheader
- goimports
- gosec
- misspell
- nakedret
- perfsprint
- paralleltest
- perfsprint
- revive
- sliceofpointers
- stylecheck
Expand All @@ -35,6 +36,15 @@ linters-settings:
enabled-checks:
- commentedOutCode
- commentFormatting
goheader:
values:
regexp:
CopyrightDate: "Copyright \\d{4} "
template: |-
{{CopyrightDate}}The go-github AUTHORS. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
gosec:
excludes:
# duplicates errcheck
Expand Down
5 changes: 5 additions & 0 deletions github/admin_stats_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2017 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github

import (
Expand Down
2 changes: 1 addition & 1 deletion github/enterprise_audit_log_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2021 The go-github AUTHORS. All rights reserved.
//
// `Use` of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github
Expand Down
2 changes: 1 addition & 1 deletion github/gists.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github
Expand Down
2 changes: 1 addition & 1 deletion github/orgs_audit_log_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2021 The go-github AUTHORS. All rights reserved.
//
// `Use` of this source code is governed by a BSD-style
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package github
Expand Down
7 changes: 2 additions & 5 deletions github/pulls_reviewers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,8 @@ func (s *PullRequestsService) ListReviewers(ctx context.Context, owner, repo str
func (s *PullRequestsService) RemoveReviewers(ctx context.Context, owner, repo string, number int, reviewers ReviewersRequest) (*Response, error) {
// reviewers.Reviewers may be empty if the caller wants to remove teams, but not users. Unlike AddReviewers,
// "reviewers" is a required param here. Reference: https://github.com/google/go-github/issues/3336
removeRequest := removeReviewersRequest{
NodeID: reviewers.NodeID,
Reviewers: reviewers.Reviewers,
TeamReviewers: reviewers.TeamReviewers,
}
// The type `removeReviewersRequest` is required because the struct tags are different from `ReviewersRequest`.
removeRequest := removeReviewersRequest(reviewers)

if removeRequest.Reviewers == nil {
// GitHub accepts the empty list, but rejects null. Removing `omitempty` is not enough - we also have to promote nil to [].
Expand Down
5 changes: 5 additions & 0 deletions scrape/apps_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package scrape

import (
Expand Down
5 changes: 5 additions & 0 deletions scrape/example/scrape/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2019 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// The scrape tool demonstrates use of the github.com/google/go-github/scrape
// package to fetch data from GitHub. The tool lists whether third-party app
// restrictions are enabled for an organization, and lists information about
Expand Down
5 changes: 5 additions & 0 deletions scrape/forms_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package scrape

import (
Expand Down
5 changes: 5 additions & 0 deletions scrape/scrape_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright 2013 The go-github AUTHORS. All rights reserved.
//
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package scrape

import (
Expand Down

0 comments on commit fb972ef

Please sign in to comment.