Security-Policy should not run on --local (#1825)

Co-authored-by: Azeem Shaikh <azeems@google.com>
This commit is contained in:
Azeem Shaikh 2022-04-07 12:12:22 -07:00 committed by GitHub
parent 4df16f3350
commit 333618d0d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 10 deletions

View File

@ -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)

View File

@ -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

View File

@ -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 {