-
Notifications
You must be signed in to change notification settings - Fork 50
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
Continue updating PRs if a merge fails #102
Conversation
5b7a7f5
to
03360cd
Compare
Codecov Report
@@ Coverage Diff @@
## master #102 +/- ##
==========================================
+ Coverage 98.83% 98.86% +0.02%
==========================================
Files 3 3
Lines 431 439 +8
Branches 64 89 +25
==========================================
+ Hits 426 434 +8
+ Misses 5 0 -5
- Partials 0 5 +5
Continue to review full report at Codecov.
|
Nice one, I'll give it a squiz this weekend. Probably need this to be logged as an |
Adds a test that throws a 403 half-way through a list of PRs that need updating to confirm that autoupdate continues to the next PR in line.
a83d451
to
ba4c102
Compare
@@ -604,4 +604,77 @@ describe('test `merge`', () => { | |||
|
|||
expect(scope.isDone()).toEqual(true); | |||
}); | |||
|
|||
test('continue if merging throws an error', async () => { |
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 is what i wanted to do! i couldn't figure out how to make multiple scopes work
ghCore.error( | ||
`Caught error running merge, skipping and continuing with remaining PRs`, | ||
); | ||
ghCore.setFailed(e); |
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.
is this necessary if we're already logging out the error in the merge method?
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.
Yea - setFailed
sets the process exitcode which marks this run as failed (which in turn sends an email to the repository / PR owner)
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.
cool lgtm
This might need some more testing/another test case - let me know if you have any ideas