Skip to content

Commit

Permalink
chore: add debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
someshkoli committed Mar 15, 2024
1 parent 51dc8cf commit c88f536
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
comment-header: "BIG HEADER"
comment-footer: "BIG FOOTER"
include-workflow-link: "true"
quite: "true"
quiet: "true"

- name: Test PR Commenter with no changes
uses: ./
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ inputs:
description: If true, include a link to the workflow in the comment
required: false
default: false
quite:
quiet:
description: Skips the comment if there are no changes
required: false
default: false
Expand Down
10 changes: 5 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12826,7 +12826,7 @@ const context = github.context;
const inputFilenames = core.getMultilineInput('json-file');
const commentHeader = core.getMultilineInput('comment-header');
const commentFooter = core.getMultilineInput('comment-footer');
const quiteMode = core.getMultilineInput('quite');
const quietMode = core.getMultilineInput('quiet');
const includeLinkToWorkflow = core.getMultilineInput('include-workflow-link');


Expand Down Expand Up @@ -12943,11 +12943,11 @@ try {
process.exit(0);
}

console.log("quiteMode", quiteMode)
console.log("quietMode", quietMode)
console.log("hasNoChanges", hasNoChanges)
console.log("quiteMode && hasNoChanges", quiteMode && hasNoChanges)
if (quiteMode && hasNoChanges) {
core.info("Quite mode is enabled and there are no changes to the infrastructure.")
console.log("quietMode && hasNoChanges", quietMode && hasNoChanges)
if (quietMode && hasNoChanges) {
core.info("quiet mode is enabled and there are no changes to the infrastructure.")
core.info("Skipping comment creation.")
process.exit(0);
}
Expand Down
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const context = github.context;
const inputFilenames = core.getMultilineInput('json-file');
const commentHeader = core.getMultilineInput('comment-header');
const commentFooter = core.getMultilineInput('comment-footer');
const quiteMode = core.getMultilineInput('quite');
const quietMode = core.getMultilineInput('quiet');
const includeLinkToWorkflow = core.getMultilineInput('include-workflow-link');


Expand Down Expand Up @@ -127,11 +127,11 @@ try {
process.exit(0);
}

console.log("quiteMode", quiteMode)
console.log("quietMode", quietMode)
console.log("hasNoChanges", hasNoChanges)
console.log("quiteMode && hasNoChanges", quiteMode && hasNoChanges)
if (quiteMode && hasNoChanges) {
core.info("Quite mode is enabled and there are no changes to the infrastructure.")
console.log("quietMode && hasNoChanges", quietMode && hasNoChanges)
if (quietMode && hasNoChanges) {
core.info("quiet mode is enabled and there are no changes to the infrastructure.")
core.info("Skipping comment creation.")
process.exit(0);
}
Expand Down

0 comments on commit c88f536

Please sign in to comment.