-
Notifications
You must be signed in to change notification settings - Fork 28
fix: Modified auto merge condition #1136
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
Conversation
…on-pnpmUpdate-394
.github/workflows/pnpm-update.yml
Outdated
| } | ||
| if (!allAcceptable) { | ||
| throw new Error(`PR #${pr.number} has failed checks that prevent merging.`); |
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.
[req] In such case, retry won't change anything right? We can already return something like 'failed' here and let the workflow finish.
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.
Log an error here. Don't throw. Throw will immediately jump out of the function and it will never reach the return.
.github/workflows/pnpm-update.yml
Outdated
| } | ||
| if (!allAcceptable) { | ||
| throw new Error(`PR #${pr.number} has failed checks that prevent merging.`); |
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.
Log an error here. Don't throw. Throw will immediately jump out of the function and it will never reach the return.
.github/workflows/pnpm-update.yml
Outdated
| git config --global user.email "[email protected]" | ||
| git config --global user.name "cloud-sdk-js" | ||
| git checkout -b "bot/monthly-transitive-dependency-update-$(date +%Y-%m-%d)" | ||
| BRANCH_NAME="bot/monthly-transitive-dependency-update-$(date -u +%Y-%m-%d-%H%M%S)" |
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.
| BRANCH_NAME="bot/monthly-transitive-dependency-update-$(date -u +%Y-%m-%d-%H%M%S)" | |
| BRANCH_NAME="bot/monthly-transitive-dependency-update-$(date -u +%Y%m%d-%H%M%S)" |
.github/workflows/pnpm-update.yml
Outdated
| github-token: ${{ secrets.GH_CLOUD_SDK_JS_ADMIN_WRITE_TOKEN }} | ||
| script: | | ||
| const { repo, owner } = context.repo; | ||
| const branch = `bot/monthly-transitive-dependency-update-${new Date().toISOString().split('T')[0]}`; |
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.
Now we changed the branch name and included H M S, we should probably also change this line or?
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.
One comment still not resolved.
…-sdk-js into githAction-pnpmUpdate-394
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.
Thanks! Look good to me.
Fixed auto merge condition and changed settimeout to https://www.npmjs.com/package/async-retry
library.