Skip to content

Commit

Permalink
Security-Policy should not run on --local (#1825)
Browse files Browse the repository at this point in the history
Co-authored-by: Azeem Shaikh <[email protected]>
  • Loading branch information
azeemshaikh38 and azeemsgoogle authored Apr 7, 2022
1 parent 4df16f3 commit 333618d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
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

0 comments on commit 333618d

Please sign in to comment.