mirror of
https://github.com/google/go-github.git
synced 2026-10-28 16:34:37 +08:00
chore: Check and fix license headers (#3449)
This commit is contained in:
1 parent
07b0446d8a
commit
fb972ef214
10 files changed
+41
-9
No files matched your search
+11
-1
@@ -11,12 +11,13 @@ linters:
|
||||
- gocritic
|
||||
- godot
|
||||
- gofmt
|
||||
- goheader
|
||||
- goimports
|
||||
- gosec
|
||||
- misspell
|
||||
- nakedret
|
||||
- perfsprint
|
||||
- paralleltest
|
||||
- perfsprint
|
||||
- revive
|
||||
- sliceofpointers
|
||||
- stylecheck
|
||||
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 [].
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in new issue
Block a user