Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Security-Policy should not run on --local #1825

Merged
merged 1 commit into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions checks/raw/security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ func SecurityPolicy(c *checker.CheckRequest) (checker.SecurityPolicyData, error)
}

// Check if present in parent org.
parentOrg := c.Repo.Org()
if parentOrg == nil {
return checker.SecurityPolicyData{}, nil
}

// https#://docs.github.com/en/github/building-a-strong-community/creating-a-default-community-health-file.
// TODO(1491): Make this non-GitHub specific.
logger := log.NewLogger(log.InfoLevel)
Expand Down
4 changes: 0 additions & 4 deletions checks/raw/security_policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ func TestSecurityPolicy(t *testing.T) {
"doc/security.rst",
},
},
{
name: "early return if org is null",
files: []string{},
},
}
for _, tt := range tests {
tt := tt
Expand Down
1 change: 0 additions & 1 deletion checks/security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const CheckSecurityPolicy = "Security-Policy"
//nolint:gochecknoinits
func init() {
supportedRequestTypes := []checker.RequestType{
checker.FileBased,
checker.CommitBased,
}
if err := registerCheck(CheckSecurityPolicy, SecurityPolicy, supportedRequestTypes); err != nil {
Expand Down