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
Copy file name to clipboardExpand all lines: setup/action.yml
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ inputs:
11
11
required: false
12
12
default: 'false'
13
13
job-name:
14
-
description: 'Name of the job being set up. When OTEL_EXPORTER_OTLP_ENDPOINT is configured, a gh-aw.job.setup span is pushed to the OTLP endpoint.'
14
+
description: 'Name of the job being set up. When OTEL_EXPORTER_OTLP_ENDPOINT is configured, a gh-aw.<job-name>.setup span is pushed to the OTLP endpoint.'
15
15
required: false
16
16
default: ''
17
17
trace-id:
@@ -23,7 +23,7 @@ outputs:
23
23
files_copied:
24
24
description: 'Number of files copied'
25
25
trace-id:
26
-
description: 'The OTLP trace ID used for the gh-aw.job.setup span. Pass this to subsequent job setup steps via the trace-id input to correlate all job spans under a single trace.'
26
+
description: 'The OTLP trace ID used for the gh-aw.<job-name>.setup span. Pass this to subsequent job setup steps via the trace-id input to correlate all job spans under a single trace.'
core.setOutput("error_message","Configuration error: Required permissions not specified");
50
+
awaitwriteDenialSummary("Configuration error: Required permissions not specified.","Contact the repository administrator to fix the workflow frontmatter configuration.");
49
51
return;
50
52
}
51
53
@@ -76,11 +78,13 @@ async function main() {
76
78
core.setOutput("user_permission","bot");
77
79
return;
78
80
}elseif(botStatus.isBot&&!botStatus.isActive){
81
+
consterrorMessage=`Access denied: Bot '${actor}' is not active/installed on this repository`;
79
82
core.warning(`Bot '${actor}' is in the allowed list but not active/installed on ${owner}/${repo}`);
core.setOutput("error_message",`Access denied: Bot '${actor}' is not active/installed on this repository`);
86
+
core.setOutput("error_message",errorMessage);
87
+
awaitwriteDenialSummary(errorMessage,"The bot is in the allowed list but is not installed or active on this repository. Install the GitHub App and try again.");
84
88
return;
85
89
}else{
86
90
core.info(`Actor '${actor}' is in allowed bots list but bot status check failed`);
awaitwriteDenialSummary(errorMessage,"The permission check failed with a GitHub API error. Check the `pre_activation` job log for details.");
96
102
}else{
103
+
consterrorMessage=
104
+
`Access denied: User '${actor}' is not authorized. Required permissions: ${requiredPermissions.join(", ")}. `+
105
+
`To allow this user to run the workflow, add their role to the frontmatter. Example: roles: [${requiredPermissions.join(", ")}, ${result.permission}]`;
`Access denied: User '${actor}' is not authorized. Required permissions: ${requiredPermissions.join(", ")}. `+
103
-
`To allow this user to run the workflow, add their role to the frontmatter. Example: roles: [${requiredPermissions.join(", ")}, ${result.permission}]`
104
-
);
109
+
core.setOutput("error_message",errorMessage);
110
+
awaitwriteDenialSummary(errorMessage,`To allow a bot or GitHub App actor, add it to \`on.bots:\` in the workflow frontmatter. `+`To change the required roles for human actors, update \`on.roles:\` in the workflow frontmatter.`);
awaitwriteDenialSummary(`Failing CI checks detected on \`${ref}\`: ${names}.`,"Fix the failing check(s) referenced in `on.skip-if-check-failing:`, or update the frontmatter configuration.");
core.warning(`🔍 Skip condition matched (${totalCount} items found, threshold: ${maxMatches}). Workflow execution will be prevented by activation job.`);
44
45
core.setOutput("skip_check_ok","false");
46
+
awaitwriteDenialSummary(`Skip-if-match query matched: ${totalCount} item(s) found (threshold: ${maxMatches}).`,"Update `on.skip-if-match:` in the workflow frontmatter if this skip was unexpected.");
0 commit comments