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

Function SupportsAttachments

pkg/cmd/issue/artifact/shared/shared.go:294–300  ·  view source on GitHub ↗

SupportsAttachments reports whether an artifact of type artifactType can take --attach files. Attachments go in Markdown, which only generic and plan artifacts hold, so a type gh learns later supports them only once it's added here.

(artifactType string)

Source from the content-addressed store, hash-verified

292// artifacts hold, so a type gh learns later supports them only once it's
293// added here.
294func SupportsAttachments(artifactType string) bool {
295 switch artifactType {
296 case client.TypeGeneric, client.TypePlan:
297 return true
298 }
299 return false
300}
301
302// HTTPURL returns value with surrounding whitespace trimmed, and whether it is
303// an http(s) URL: an absolute http or https URL with a host, in printable

Callers 4

NewCmdCreateFunction · 0.92
attachFunction · 0.92
newBodyFunction · 0.92
TestSupportsAttachmentsFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestSupportsAttachmentsFunction · 0.68