Skip to content

Commit

Permalink
No issues or pulls are fine for GHSA changelog snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
bernd committed Aug 2, 2023
1 parent 9ea92aa commit a231cc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion changelog/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"github.com/Graylog2/graylog-project-cli/logger"
"github.com/Graylog2/graylog-project-cli/utils"
"path/filepath"
"strings"
"time"
)
Expand Down Expand Up @@ -50,7 +51,9 @@ func LintPaths(paths []string, strict bool) error {
}
}

if len(urlList) == 0 {
// The GitHub security advisories (GHSA) might not have linked issues or pulls because the PRs might be
// created in private forks as part of the security advisory process.
if len(urlList) == 0 && !strings.HasPrefix(strings.ToLower(filepath.Base(file)), "ghsa-") {
errors = append(errors, fmt.Errorf("linter error in file %s: at least one issue or pull request number needs to be present", file))
continue
}
Expand Down

0 comments on commit a231cc4

Please # to comment.