MCPcopy Create free account
hub / github.com/cli/cli / isMarkdownFile

Function isMarkdownFile

pkg/cmd/repo/view/view.go:218–225  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

216}
217
218func isMarkdownFile(filename string) bool {
219 // kind of gross, but i'm assuming that 90% of the time the suffix will just be .md. it didn't
220 // seem worth executing a regex for this given that assumption.
221 return strings.HasSuffix(filename, ".md") ||
222 strings.HasSuffix(filename, ".markdown") ||
223 strings.HasSuffix(filename, ".mdown") ||
224 strings.HasSuffix(filename, ".mkdown")
225}
226
227func generateBranchURL(r ghrepo.Interface, branch string) string {
228 if branch == "" {

Callers 1

viewRunFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected