You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
throw"Unable to resolve dispatching actor '$TriggeringActor' to a supported GitHub App."
47
+
}
48
+
49
+
if ([string]::IsNullOrWhiteSpace($installationId)) {
50
+
throw"GitHub App installation id is not configured for dispatching actor '$TriggeringActor'."
51
+
}
52
+
53
+
$authorizedTargetEnvs=@(
54
+
$gatedEnvironments|
55
+
Where-Object { $_-in$pipelineEnvironments }
56
+
)
57
+
58
+
if ($authorizedTargetEnvs.Count-eq0) {
59
+
throw"Dispatching actor '$TriggeringActor' is not authorized for any workflow-gated environment. Gated environments: $($gatedEnvironments-join', '). Pipeline environments: $($pipelineEnvironments-join', ')."
60
+
}
61
+
62
+
return@{
63
+
Primary=$primaryEnv
64
+
Pipeline=@($pipelineEnvironments)
65
+
AuthorizedTargetEnvs=@($authorizedTargetEnvs)
66
+
InstallationId=$installationId
67
+
}
68
+
}
69
+
70
+
functionResolve-WorkflowQueueContext {
71
+
[CmdletBinding()]
72
+
param(
73
+
[Parameter(Mandatory)]
74
+
[string] $WorkflowName,
75
+
76
+
[Parameter(Mandatory)]
77
+
[string] $EnvironmentName,
78
+
79
+
[Parameter()]
80
+
[string] $LocalVerificationDirectiveJson=""
81
+
)
82
+
83
+
if ([string]::IsNullOrWhiteSpace($WorkflowName)) {
84
+
throw"WorkflowName is required."
85
+
}
86
+
87
+
$separatorIndex=$WorkflowName.IndexOf('-')
88
+
if ($separatorIndex-le0-or$separatorIndex-ge ($WorkflowName.Length-1)) {
89
+
throw"Workflow name '$WorkflowName' must match '<dispatcher>-<instanceId>'."
0 commit comments