Skip to content
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

Add an option to pass only if no commits between source and target #73

Closed
i077 opened this issue Jun 16, 2021 · 2 comments
Closed

Add an option to pass only if no commits between source and target #73

i077 opened this issue Jun 16, 2021 · 2 comments

Comments

@i077
Copy link

i077 commented Jun 16, 2021

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.

@vsoch
Copy link
Owner

vsoch commented Jun 16, 2021

I would add the logic in the step. I’m not sure parsing error messages would be a reliable thing to do over time if they change, etc.

@i077
Copy link
Author

i077 commented Jun 18, 2021

Fair enough, I'll close this then.

@i077 i077 closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants