File tree Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Expand file tree Collapse file tree 4 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 11# execute-whitelist-action
22 Action to whitelist executions
3+
4+ <!--
5+ npm run build && git add . && git commit -m "Fix buffer" && git tag -a -m "Buffer fix" v1.0.10 && git push --follow-tags && gh release create v1.0.10 --generate-notes
6+ -->
Original file line number Diff line number Diff line change @@ -29258,19 +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();
2926129262 core.summary.addHeading("Action Authorization");
2926229263 core.summary.addBreak();
2926329264 core.summary.addRaw("This workflow run is authorized by ");
2926429265 core.summary.addLink(`${username} (${userId})`, `https://github.com/${username}`);
2926529266 core.summary.addRaw(".");
29267+ core.summary.write({ overwrite: true });
2926629268 }
2926729269 else {
2926829270 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();
2926929272 core.summary.addHeading("Action Authorization Failure");
2927029273 core.summary.addBreak();
2927129274 core.summary.addRaw("This workflow run was executed by ");
2927229275 core.summary.addLink(`${username} (${userId})`, `https://github.com/${username}`);
2927329276 core.summary.addRaw(" and is unauthorized!");
29277+ core.summary.write({ overwrite: true });
2927429278 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`);
2927529279 }
2927629280 }
Original file line number Diff line number Diff line change 11{
22 "name" : " execute-whitelist-action" ,
3- "version" : " 1.0.9 " ,
3+ "version" : " 1.0.10 " ,
44 "description" : " Action to whitelist executions" ,
55 "main" : " index.ts" ,
66 "scripts" : {
13131414 "url" : " https://github.com/Lulalaby"
1515 },
16- "license" : " ISC " ,
16+ "license" : " MIT " ,
1717 "repository" : {
1818 "type" : " git" ,
1919 "url" : " https://github.com/Pycord-Development/execute-whitelist-action"
Original file line number Diff line number Diff line change @@ -31,18 +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 ( ) ;
3435 core . summary . addHeading ( "Action Authorization" ) ;
3536 core . summary . addBreak ( )
3637 core . summary . addRaw ( "This workflow run is authorized by " ) ;
3738 core . summary . addLink ( `${ username } (${ userId } )` , `https://github.com/${ username } ` )
3839 core . summary . addRaw ( "." ) ;
40+ core . summary . write ( { overwrite : true } ) ;
3941 } else {
4042 core . notice ( `${ styles . green . open } User ${ styles . bold . open } ${ userId } ${ styles . bold . close } authorized this workflow run.${ styles . green . close } ` ) ;
43+ core . summary . clear ( ) ;
4144 core . summary . addHeading ( "Action Authorization Failure" ) ;
4245 core . summary . addBreak ( )
4346 core . summary . addRaw ( "This workflow run was executed by " ) ;
4447 core . summary . addLink ( `${ username } (${ userId } )` , `https://github.com/${ username } ` )
4548 core . summary . addRaw ( " and is unauthorized!" ) ;
49+ core . summary . write ( { overwrite : true } ) ;
4650 throw new Error ( `User ${ styles . bold . open } ${ userId } ${ styles . bold . close } is not authorized to run this workflow. Aborting` ) ;
4751 }
4852 } catch ( error : any ) {
You can’t perform that action at this time.
0 commit comments