MCPcopy Create free account
hub / github.com/openshift/origin / renderGodepFilesError

Function renderGodepFilesError

tools/rebasehelpers/commitchecker/validate.go:216–232  ·  view source on GitHub ↗

renderGodepFilesError formats commits and their file lists into readable output prefixed with label.

(label string, commits []util.Commit, opt CommitFilesRenderOption)

Source from the content-addressed store, hash-verified

214// renderGodepFilesError formats commits and their file lists into readable
215// output prefixed with label.
216func renderGodepFilesError(label string, commits []util.Commit, opt CommitFilesRenderOption) string {
217 msg := fmt.Sprintf("%s:\n\n", label)
218 for _, commit := range commits {
219 msg += fmt.Sprintf("[%s] %s\n", commit.Sha, commit.Summary)
220 if opt == RenderNoFiles {
221 continue
222 }
223 for _, file := range commit.Files {
224 if opt == RenderAllFiles ||
225 (opt == RenderOnlyGodepsFiles && file.HasVendoredCodeChanges()) ||
226 (opt == RenderOnlyNonGodepsFiles && !file.HasVendoredCodeChanges()) {
227 msg += fmt.Sprintf(" - %s\n", file)
228 }
229 }
230 }
231 return msg
232}

Calls 1

Tested by

no test coverage detected