-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Allow the workflow to push directly to the default branch #14
Conversation
Allow the workflow to push directly to the default branch
Fix existing pr error
Build the dist version
src/config.js
Outdated
}), | ||
SKIP_PR: getVar({ | ||
key: 'SKIP_PR', | ||
required: false, |
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.
required defaults to false, so you can remove it here.
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.
Updated
@@ -89,7 +89,12 @@ const context = { | |||
GITHUB_REPOSITORY: getVar({ | |||
key: 'GITHUB_REPOSITORY', | |||
required: true | |||
}) | |||
}), | |||
SKIP_PR: getVar({ |
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.
As the option only accepts true or false, specify the type like this:
type: 'boolean'
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.
Updated
Thanks for this great PR, this something I had on my mind, but haven’t implemented yet. If you address the small changes I will merge this ASAP. PS: Thanks for correcting my spelling mistakes too 😄 |
I updated all the changes you mentioned. The feature came really useful for automation, awesome work on the action! |
Thanks! Will merge this later today 👍 |
await git.createPrBranch() | ||
|
||
// Check for existing PR and add warning message that the PR maybe about to change | ||
const existingPr = OVERWRITE_EXISTING_PR ? await git.findExistingPr() : undefined |
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.
existingPr
needs to be declared outside of this if statement because it is used later.
@@ -118,12 +122,18 @@ const run = async () => { | |||
if (hasChanges === false && modified.length < 1) { | |||
core.info('File(s) already up to date') | |||
|
|||
if (existingPr) await git.removePrWarning() | |||
if (SKIP_PR) { |
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.
This check is not really necessary, as the PR warning only gets removed if there is an existing PR.
@villainous-hippogriff I can't push anything to this PR since you made the changes on the master branch of your fork. I will merge this PR into the develop branch and fix the remaining issues there. |
Co-authored-by: BetaHuhn <schiller@mxis.ch>
Co-authored-by: BetaHuhn <schiller@mxis.ch>
🎉 This PR is included in version 1.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
For complete automation it was required that files are synced without the need for user interaction. If the option SKIP_PR is set to true (defaulted to false), it will push the changes without a PR.