MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / getDefaultWorkflowIdsForPlatforms

Function getDefaultWorkflowIdsForPlatforms

src/cli/commands/setup.ts:247–263  ·  view source on GitHub ↗
(
  workflows: WorkflowManifestEntry[],
  platforms: SetupPlatform[],
)

Source from the content-addressed store, hash-verified

245}
246
247function getDefaultWorkflowIdsForPlatforms(
248 workflows: WorkflowManifestEntry[],
249 platforms: SetupPlatform[],
250): string[] {
251 const availableIds = new Set(workflows.map((workflow) => workflow.id));
252 const defaults: string[] = [];
253
254 if (platforms.includes('macOS') && availableIds.has('macos')) {
255 defaults.push('macos');
256 }
257
258 if (platforms.some((platform) => platform !== 'macOS') && availableIds.has('simulator')) {
259 defaults.push('simulator');
260 }
261
262 return defaults;
263}
264
265function toWorkflowSelectOptions(workflows: WorkflowManifestEntry[]): SelectOption<string>[] {
266 return workflows.map((workflow) => ({

Callers 1

selectWorkflowIdsFunction · 0.85

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected