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

Function ifcSearchPostProcessOption

pkg/github/ifc_labels.go:72–77  ·  view source on GitHub ↗

ifcSearchPostProcessOption returns a searchOption that attaches IFC labels to a multi-repository search result. The feature-flag check is centralized here (mirroring the attach* helpers above) rather than in each search tool handler: when IFC labels are disabled it returns a no-op option, so callers

(ctx context.Context, deps ToolDependencies)

Source from the content-addressed store, hash-verified

70// handler: when IFC labels are disabled it returns a no-op option, so callers
71// can pass it unconditionally to searchHandler.
72func ifcSearchPostProcessOption(ctx context.Context, deps ToolDependencies) searchOption {
73 if !deps.IsFeatureEnabled(ctx, FeatureFlagIFCLabels) {
74 return func(*searchConfig) {}
75 }
76 return withSearchPostProcess(searchIssuesIFCPostProcess(deps))
77}
78
79// attachRepoVisibilityIFCLabelLazy is like attachRepoVisibilityIFCLabel but
80// resolves the REST client itself, only when IFC labels are enabled. It is used

Callers 2

SearchIssuesFunction · 0.85
SearchPullRequestsFunction · 0.85

Calls 3

withSearchPostProcessFunction · 0.85
IsFeatureEnabledMethod · 0.65

Tested by

no test coverage detected