@@ -16,8 +16,27 @@ type LogLine = {
1616 message: string ;
1717};
1818
19- const LogLinePrefixGroup = ' ::group::' ;
20- const LogLinePrefixEndGroup = ' ::endgroup::' ;
19+ const LogLinePrefixesGroup = [' ::group::' , ' ##[group]' ];
20+ const LogLinePrefixesEndGroup = [' ::endgroup::' , ' ##[endgroup]' ];
21+
22+ type LogLineCommand = {
23+ name: ' group' | ' endgroup' ,
24+ prefix: string ,
25+ }
26+
27+ function parseLineCommand(line : LogLine ): LogLineCommand | null {
28+ for (const prefix of LogLinePrefixesGroup ) {
29+ if (line .message .startsWith (prefix )) {
30+ return {name: ' group' , prefix };
31+ }
32+ }
33+ for (const prefix of LogLinePrefixesEndGroup ) {
34+ if (line .message .startsWith (prefix )) {
35+ return {name: ' endgroup' , prefix };
36+ }
37+ }
38+ return null ;
39+ }
2140
2241const sfc = {
2342 name: ' RepoActionView' ,
@@ -129,13 +148,13 @@ const sfc = {
129148 return el ._stepLogsActiveContainer ?? el ;
130149 },
131150 // begin a log group
132- beginLogGroup(stepIndex : number , startTime : number , line : LogLine ) {
151+ beginLogGroup(stepIndex : number , startTime : number , line : LogLine , cmd : LogLineCommand ) {
133152 const el = this .$refs .logs [stepIndex ];
134153 const elJobLogGroupSummary = createElementFromAttrs (' summary' , {class: ' job-log-group-summary' },
135154 this .createLogLine (stepIndex , startTime , {
136155 index: line .index ,
137156 timestamp: line .timestamp ,
138- message: line .message .substring (LogLinePrefixGroup .length ),
157+ message: line .message .substring (cmd . prefix .length ),
139158 }),
140159 );
141160 const elJobLogList = createElementFromAttrs (' div' , {class: ' job-log-list' });
@@ -147,13 +166,13 @@ const sfc = {
147166 el ._stepLogsActiveContainer = elJobLogList ;
148167 },
149168 // end a log group
150- endLogGroup(stepIndex : number , startTime : number , line : LogLine ) {
169+ endLogGroup(stepIndex : number , startTime : number , line : LogLine , cmd : LogLineCommand ) {
151170 const el = this .$refs .logs [stepIndex ];
152171 el ._stepLogsActiveContainer = null ;
153172 el .append (this .createLogLine (stepIndex , startTime , {
154173 index: line .index ,
155174 timestamp: line .timestamp ,
156- message: line .message .substring (LogLinePrefixEndGroup .length ),
175+ message: line .message .substring (cmd . prefix .length ),
157176 }));
158177 },
159178
@@ -201,11 +220,12 @@ const sfc = {
201220 appendLogs(stepIndex : number , startTime : number , logLines : LogLine []) {
202221 for (const line of logLines ) {
203222 const el = this .getLogsContainer (stepIndex );
204- if (line .message .startsWith (LogLinePrefixGroup )) {
205- this .beginLogGroup (stepIndex , startTime , line );
223+ const cmd = parseLineCommand (line );
224+ if (cmd ?.name === ' group' ) {
225+ this .beginLogGroup (stepIndex , startTime , line , cmd );
206226 continue ;
207- } else if (line . message . startsWith ( LogLinePrefixEndGroup ) ) {
208- this .endLogGroup (stepIndex , startTime , line );
227+ } else if (cmd ?. name === ' endgroup ' ) {
228+ this .endLogGroup (stepIndex , startTime , line , cmd );
209229 continue ;
210230 }
211231 el .append (this .createLogLine (stepIndex , startTime , line ));
@@ -393,7 +413,7 @@ export function initRepositoryActionView() {
393413 <button class =" ui basic small compact button red" @click =" cancelRun()" v-else-if =" run.canCancel" >
394414 {{ locale.cancel }}
395415 </button >
396- <button class =" ui basic small compact button tw-mr-0 tw-whitespace-nowrap link-action" :data-url =" `${run.link}/rerun`" v-else-if =" run.canRerun" >
416+ <button class =" ui basic small compact button link-action" :data-url =" `${run.link}/rerun`" v-else-if =" run.canRerun" >
397417 {{ locale.rerun_all }}
398418 </button >
399419 </div >
@@ -539,6 +559,11 @@ export function initRepositoryActionView() {
539559 overflow-wrap : anywhere;
540560}
541561
562+ .action-info-summary .ui.button {
563+ margin : 0 ;
564+ white-space : nowrap ;
565+ }
566+
542567.action-commit-summary {
543568 display : flex ;
544569 flex-wrap : wrap ;
0 commit comments