-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add output for commited changes #3
base: main
Are you sure you want to change the base?
Conversation
@@ -93,10 +101,19 @@ async function main() { | |||
await exec.exec('git', ['checkout', 'HEAD', '-B', branch]); | |||
|
|||
await exec.exec('git', ['commit', '-am', git_commit_message]); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -93,10 +101,19 @@ async function main() { | |||
await exec.exec('git', ['checkout', 'HEAD', '-B', branch]); | |||
|
|||
await exec.exec('git', ['commit', '-am', git_commit_message]); | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -72,7 +80,7 @@ async function main() { | |||
); | |||
} | |||
} | |||
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
} else { | ||
core.setOutput('committed', ''); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove those else blocks and reduce the 3 core.submit lines to a single one
} | |
} | |
core.setOutput('committed', sha); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would have to set let sha = ''
earlier before line 84
How does outputting the commit allow stopping following steps? |
@nitrocode I just fail the build if |
This allows stopping following steps if pre-commit found an issue that was auto-fixed.