Skip to content

Commit 1909c15

Browse files
chore: Logs more readable
1 parent 97dfe8f commit 1909c15

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39050,8 +39050,8 @@ function run(context) {
3905039050
actionPolicyList.forEach((item) => {
3905139051
console.log(item.toString());
3905239052
});
39053+
console.log("\nREADING WORKFLOW FILES");
3905339054
workflowFilePaths.forEach((wf) => {
39054-
console.log("\nREADING WORKFLOW FILES");
3905539055
console.log(line);
3905639056
let workflow = { filePath: wf, actions: Array() };
3905739057
workflowFiles.push(workflow);
@@ -39106,12 +39106,12 @@ function run(context) {
3910639106
actionViolations.push(violation);
3910739107
}
3910839108
else {
39109-
console.log("\nNo violations detected");
39109+
console.log("\n ✅ No violations detected");
3911039110
}
3911139111
});
3911239112
if (actionViolations.length > 0) {
3911339113
core.setOutput("violations", actionViolations);
39114-
console.log("\n!!! ACTION POLICY VIOLATIONS DETECTED !!!");
39114+
console.log("\nACTION POLICY VIOLATIONS DETECTED ");
3911539115
console.log(line);
3911639116
actionViolations.forEach((workflow) => {
3911739117
console.log(`Workflow: ${workflow.filePath}`);
@@ -39121,11 +39121,11 @@ function run(context) {
3912139121
console.log();
3912239122
});
3912339123
if (failIfViolations) {
39124-
core.setFailed("!!! ACTION POLICY VIOLATIONS DETECTED !!!");
39124+
core.setFailed("ACTION POLICY VIOLATIONS DETECTED ");
3912539125
}
3912639126
}
3912739127
else {
39128-
console.log("\nAll workflow files contain actions that conform to the policy provided.");
39128+
console.log("\n ✅ All workflow files contain actions that conform to the policy provided.");
3912939129
}
3913039130
}
3913139131
catch (error) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "actionbot",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"private": true,
55
"description": "Github Action Policy Checker as a Github Action",
66
"main": "lib/index.js",

src/main.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ async function run(context: typeof github.context): Promise<void> {
202202
console.log(item.toString());
203203
});
204204

205+
console.log("\nREADING WORKFLOW FILES");
205206
workflowFilePaths.forEach((wf) => {
206-
console.log("\nREADING WORKFLOW FILES");
207207
console.log(line);
208208
let workflow: Workflow = { filePath: wf, actions: Array<Action>() };
209209
workflowFiles.push(workflow);
@@ -267,13 +267,13 @@ async function run(context: typeof github.context): Promise<void> {
267267
if (violation.actions.length > 0) {
268268
actionViolations.push(violation);
269269
} else {
270-
console.log("\nNo violations detected");
270+
console.log("\n ✅ No violations detected");
271271
}
272272
});
273273

274274
if (actionViolations.length > 0) {
275275
core.setOutput("violations", actionViolations);
276-
console.log("\n!!! ACTION POLICY VIOLATIONS DETECTED !!!");
276+
console.log("\nACTION POLICY VIOLATIONS DETECTED ");
277277
console.log(line);
278278

279279
actionViolations.forEach((workflow) => {
@@ -287,11 +287,11 @@ async function run(context: typeof github.context): Promise<void> {
287287
});
288288

289289
if (failIfViolations) {
290-
core.setFailed("!!! ACTION POLICY VIOLATIONS DETECTED !!!");
290+
core.setFailed("ACTION POLICY VIOLATIONS DETECTED ");
291291
}
292292
} else {
293293
console.log(
294-
"\nAll workflow files contain actions that conform to the policy provided.",
294+
"\n ✅ All workflow files contain actions that conform to the policy provided.",
295295
);
296296
}
297297
} catch (error: unknown) {

0 commit comments

Comments
 (0)