File tree Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Expand file tree Collapse file tree 4 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -29258,8 +29258,23 @@ async function run() {
2925829258 const userId = user.id.toString();
2925929259 if (allowedUserIds.includes(userId)) {
2926029260 core.notice(`${ansi_styles_1.default.green.open}User ${ansi_styles_1.default.bold.open}${userId}${ansi_styles_1.default.bold.close} authorized this workflow run.${ansi_styles_1.default.green.close}`);
29261+ core.summary.clear();
29262+ core.summary.addHeading("Action Authorization");
29263+ core.summary.addBreak();
29264+ core.summary.addRaw("This workflow run is authorized by ");
29265+ core.summary.addLink(`${username} (${userId})`, `https://github.com/${username}`);
29266+ core.summary.addRaw(".");
29267+ core.summary.write();
2926129268 }
2926229269 else {
29270+ core.notice(`${ansi_styles_1.default.green.open}User ${ansi_styles_1.default.bold.open}${userId}${ansi_styles_1.default.bold.close} authorized this workflow run.${ansi_styles_1.default.green.close}`);
29271+ core.summary.clear();
29272+ core.summary.addHeading("Action Authorization Failure");
29273+ core.summary.addBreak();
29274+ core.summary.addRaw("This workflow run was executed by ");
29275+ core.summary.addLink(`${username} (${userId})`, `https://github.com/${username}`);
29276+ core.summary.addRaw(" and is unauthorized!");
29277+ core.summary.write();
2926329278 throw new Error(`User ${ansi_styles_1.default.bold.open}${userId}${ansi_styles_1.default.bold.close} is not authorized to run this workflow. Aborting`);
2926429279 }
2926529280 }
Original file line number Diff line number Diff line change 11{
22 "name" : " execute-whitelist-action" ,
3- "version" : " 1.0.6 " ,
3+ "version" : " 1.0.7 " ,
44 "description" : " Action to whitelist executions" ,
55 "main" : " index.ts" ,
66 "scripts" : {
Original file line number Diff line number Diff line change @@ -31,7 +31,22 @@ async function run() {
3131
3232 if ( allowedUserIds . includes ( userId ) ) {
3333 core . notice ( `${ styles . green . open } User ${ styles . bold . open } ${ userId } ${ styles . bold . close } authorized this workflow run.${ styles . green . close } ` ) ;
34+ core . summary . clear ( )
35+ core . summary . addHeading ( "Action Authorization" ) ;
36+ core . summary . addBreak ( )
37+ core . summary . addRaw ( "This workflow run is authorized by " ) ;
38+ core . summary . addLink ( `${ username } (${ userId } )` , `https://github.com/${ username } ` )
39+ core . summary . addRaw ( "." ) ;
40+ core . summary . write ( )
3441 } else {
42+ core . notice ( `${ styles . green . open } User ${ styles . bold . open } ${ userId } ${ styles . bold . close } authorized this workflow run.${ styles . green . close } ` ) ;
43+ core . summary . clear ( )
44+ core . summary . addHeading ( "Action Authorization Failure" ) ;
45+ core . summary . addBreak ( )
46+ core . summary . addRaw ( "This workflow run was executed by " ) ;
47+ core . summary . addLink ( `${ username } (${ userId } )` , `https://github.com/${ username } ` )
48+ core . summary . addRaw ( " and is unauthorized!" ) ;
49+ core . summary . write ( )
3550 throw new Error ( `User ${ styles . bold . open } ${ userId } ${ styles . bold . close } is not authorized to run this workflow. Aborting` ) ;
3651 }
3752 } catch ( error : any ) {
You can’t perform that action at this time.
0 commit comments