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

Function attachJoinedIFCLabel

pkg/github/ifc_labels.go:109–121  ·  view source on GitHub ↗

attachJoinedIFCLabel attaches an IFC label computed by joining a set of per-item visibilities (true == private) when IFC labels are enabled. joinFn is the lattice join for the relevant item kind (e.g. ifc.LabelSearchIssues or ifc.LabelProjectList). The visibility slice is cheap to build from an alre

(
	ctx context.Context,
	deps ToolDependencies,
	r *mcp.CallToolResult,
	visibilities []bool,
	joinFn func([]bool) ifc.SecurityLabel,
)

Source from the content-addressed store, hash-verified

107// already-fetched response, so callers may construct it unconditionally and let
108// this helper own the feature-flag gate.
109func attachJoinedIFCLabel(
110 ctx context.Context,
111 deps ToolDependencies,
112 r *mcp.CallToolResult,
113 visibilities []bool,
114 joinFn func([]bool) ifc.SecurityLabel,
115) *mcp.CallToolResult {
116 if !shouldAttachIFCLabel(ctx, deps, r) {
117 return r
118 }
119 setIFCLabel(r, joinFn(visibilities))
120 return r
121}
122
123func attachProjectVisibilityIFCLabel(
124 ctx context.Context,

Callers 4

ListStarredRepositoriesFunction · 0.85
ProjectsListFunction · 0.85
SearchCodeFunction · 0.85
SearchCommitsFunction · 0.85

Calls 2

shouldAttachIFCLabelFunction · 0.85
setIFCLabelFunction · 0.85

Tested by

no test coverage detected