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

Function LabelProjectList

pkg/ifc/ifc.go:329–346  ·  view source on GitHub ↗

LabelProjectList returns the IFC label for a list_projects result, joining the per-project labels across every returned project. Public-only results are untrusted and public. All-private results are trusted and private. Mixed public/private results are untrusted and private: public items keep the j

(projectVisibilities []bool)

Source from the content-addressed store, hash-verified

327// items keep the joined payload's integrity untrusted, while private items keep
328// the joined payload's confidentiality private.
329func LabelProjectList(projectVisibilities []bool) SecurityLabel {
330 var anyPrivate, anyPublic bool
331 for _, isPrivate := range projectVisibilities {
332 if isPrivate {
333 anyPrivate = true
334 } else {
335 anyPublic = true
336 }
337 }
338 switch {
339 case anyPrivate && anyPublic:
340 return PrivateUntrusted()
341 case anyPrivate:
342 return PrivateTrusted()
343 default:
344 return PublicUntrusted()
345 }
346}
347
348// LabelProjectContent returns the IFC label for project results that can include
349// item content, field values, or status update bodies. These can aggregate

Callers 1

TestLabelProjectListFunction · 0.85

Calls 3

PrivateUntrustedFunction · 0.85
PrivateTrustedFunction · 0.85
PublicUntrustedFunction · 0.85

Tested by 1

TestLabelProjectListFunction · 0.68