I'm working on nix-community/home-manager#1934, which adds a GitHub workflow to update a lockfile and open (or update) a PR against the update using this action (thank you for this action!). One of the concerns a reviewer raised was that I set PASS_ON_ERROR, which would mean that the step would pass for any arbitrary non-OK response from the PR action. I think options to pass only on specific errors would be convenient in general, but specifically for our use case, we need:
An option to pass if the PR is already open (which is done already), and
An option to pass if there are no commits between the source and target branches
Going off the API documentation, it seems that GitHub will just return a 422 for any error that isn't auth-related. Given that, I'm not sure how easy or maintainable this will be since you might just end up checking the response messages. If this isn't possible, I can put this logic in the step itself, but if it is, I thought it might be a useful option to add here.
I'm working on nix-community/home-manager#1934, which adds a GitHub workflow to update a lockfile and open (or update) a PR against the update using this action (thank you for this action!). One of the concerns a reviewer raised was that I set
PASS_ON_ERROR
, which would mean that the step would pass for any arbitrary non-OK response from the PR action. I think options to pass only on specific errors would be convenient in general, but specifically for our use case, we need:Going off the API documentation, it seems that GitHub will just return a 422 for any error that isn't auth-related. Given that, I'm not sure how easy or maintainable this will be since you might just end up checking the response messages. If this isn't possible, I can put this logic in the step itself, but if it is, I thought it might be a useful option to add here.