-
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
feat: warn if autoupdate fails on a fork #219
Conversation
d989433
to
e2c285f
Compare
Codecov Report
@@ Coverage Diff @@
## master #219 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 565 593 +28
Branches 84 88 +4
=========================================
+ Hits 565 593 +28
Continue to review full report at Codecov.
|
(e as RequestError).status === 403 && | ||
sourceEventOwner !== mergeOpts.owner | ||
) { | ||
ghCore.error( |
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.
do you think it would be useful to include github's actual error message here as well?
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.
Might be too verbose for the annotation? Though, I'll add it in as a debug message, might be helpful for figuring out issues
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.
It's not too bad tbh, what do you think? https://github.com/chinthakagodawita/autoupdate-test/actions/runs/1181370405
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.
Yeah I think that's good
unrelated to this PR, but I noticed in your autoupdate-test run that the successful PR updates didn't log out the success message |
The Github API now returns a HTTP 201 on successful merge.
Good catch! Looks like the API returns a Updated in 4ea966d Example run here: https://github.com/chinthakagodawita/autoupdate-test/runs/3471509330?check_suite_focus=true |
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.
👍
Released in v1.6.0 |
Instead of erroring out the Actions run, this change will make autoupdate gracefully handle updates against forks that it doesn't have write access to.
Also in this change:
Example here: https://github.com/chinthakagodawita/autoupdate-test/actions/runs/1176318083 (notice the error annotation instead of a failed build)
Fixes #212