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

Function attachProjectVisibilityIFCLabel

pkg/github/ifc_labels.go:123–135  ·  view source on GitHub ↗
(
	ctx context.Context,
	deps ToolDependencies,
	r *mcp.CallToolResult,
	isPrivate bool,
	labelFn func(isPrivate bool) ifc.SecurityLabel,
)

Source from the content-addressed store, hash-verified

121}
122
123func attachProjectVisibilityIFCLabel(
124 ctx context.Context,
125 deps ToolDependencies,
126 r *mcp.CallToolResult,
127 isPrivate bool,
128 labelFn func(isPrivate bool) ifc.SecurityLabel,
129) *mcp.CallToolResult {
130 if !shouldAttachIFCLabel(ctx, deps, r) {
131 return r
132 }
133 setIFCLabel(r, labelFn(isPrivate))
134 return r
135}
136
137// newRepoVisibilityIFCLabeler returns a closure that attaches a repo-visibility
138// IFC label to a tool result, for handlers that have several return paths and

Callers 2

ProjectsListFunction · 0.85
ProjectsGetFunction · 0.85

Calls 2

shouldAttachIFCLabelFunction · 0.85
setIFCLabelFunction · 0.85

Tested by

no test coverage detected