Closed ben-z closed 4 months ago
Thanks for the PR! I like this change and I agree with the philosophy, I see this was also bought up in #1472 also. It's sometimes hard to really predict what an actual error is here as there doesn't seem to be a standardized way of checking for them outside of just doing a string match.
I'll run this through the integration suite and bundle this with a few long-standing dependency changes I've been meaning to make, I'll likely wrap this up once I am back from my upcoming trip.
Description
Currently, we ignore git push errors and only fail when we find specific substrings in stdout or stderr starts with
fatal:
. This is insufficient to catch all errors because sometimesfatal:
can occur on lines that are not the first. For example:In the output above, the
fatal:
message occurs on the second line.Testing Instructions
Run this action without giving the job
contents: write
permission. Before this change, the job will silently fail. After this change, the job will raise an exception as expected.Additional Notes
The approach of ignoring all issues except some known ones is very error prone. We should instead do the opposite: ignore all known non-issues and raise an exception for everything else. But this takes more work and may be a breaking change for some use cases until we can gather a complete list of non-errors.