MCPcopy
hub / github.com/github/github-mcp-server / LabelSearchIssues

Function LabelSearchIssues

pkg/ifc/ifc.go:135–152  ·  view source on GitHub ↗

LabelSearchIssues returns the IFC label for a multi-repository search result, joining per-repository labels across all matched repositories. Used by both search_issues and search_repositories. Public-only results are untrusted and public. All-private results are trusted and private because private

(repoVisibilities []bool)

Source from the content-addressed store, hash-verified

133// until then they would invite unsafe declassification of a "public" item that
134// actually arrived alongside private data.
135func LabelSearchIssues(repoVisibilities []bool) SecurityLabel {
136 var anyPrivate, anyPublic bool
137 for _, isPrivate := range repoVisibilities {
138 if isPrivate {
139 anyPrivate = true
140 } else {
141 anyPublic = true
142 }
143 }
144 switch {
145 case anyPrivate && anyPublic:
146 return PrivateUntrusted()
147 case anyPrivate:
148 return PrivateTrusted()
149 default:
150 return PublicUntrusted()
151 }
152}
153
154// LabelRepoMetadata returns the IFC label for structural repository metadata
155// that only collaborators with write access can define: labels, branches,

Callers 3

TestLabelSearchIssuesFunction · 0.85

Calls 3

PrivateUntrustedFunction · 0.85
PrivateTrustedFunction · 0.85
PublicUntrustedFunction · 0.85

Tested by 1

TestLabelSearchIssuesFunction · 0.68