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

Function attachStaticIFCLabel

pkg/github/ifc_labels.go:31–37  ·  view source on GitHub ↗

attachStaticIFCLabel attaches a fixed IFC label to a successful tool result when IFC labels are enabled. It is used by tools whose label does not depend on any repository visibility lookup (e.g. security alerts, global advisories, team membership, notification subjects). Error results are left unto

(ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult, label ifc.SecurityLabel)

Source from the content-addressed store, hash-verified

29// Error results are left untouched, and the label is omitted entirely when the
30// IFC feature flag is disabled.
31func attachStaticIFCLabel(ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult, label ifc.SecurityLabel) *mcp.CallToolResult {
32 if !shouldAttachIFCLabel(ctx, deps, r) {
33 return r
34 }
35 setIFCLabel(r, label)
36 return r
37}
38
39// attachRepoVisibilityIFCLabel attaches an IFC label derived from a single
40// repository's visibility to a successful tool result when IFC labels are

Callers 15

ListIssueTypesFunction · 0.85
ListIssuesFunction · 0.85
ListIssueFieldsFunction · 0.85
ProjectsListFunction · 0.85
ProjectsGetFunction · 0.85
GetNotificationDetailsFunction · 0.85
userOrOrgHandlerFunction · 0.85
GetSecretScanningAlertFunction · 0.85

Calls 2

shouldAttachIFCLabelFunction · 0.85
setIFCLabelFunction · 0.85

Tested by

no test coverage detected