-
Notifications
You must be signed in to change notification settings - Fork 259
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
Base ref for new branches #33
Comments
I see your point. It will require some changes in the code. I will look into it as I get back from vacation next week. |
Thanks, for opening this issue. Indeed the desired behavior is what you proposed: I will fix it soon. |
Fix is available on |
Fixed in release v2.3.0 |
Hey @dorny, thanks for the update! It solves the use case when the
when the base is your current branch and there's no previous commit (new branch) I think it should default to merge base and not output that all files have changed. |
The For example: Any thoughts on this solution? |
@dorny seems reasonable to me. I can't think of a use case where anyone using this action would want all the files included as changed, so having these sane default fallbacks should be the way to go. 👍 |
When having a bigger codebase, which has PR merges quite frequently, the default setting for
base
parameter withmaster
branch defeats the purpose of this action a bit, as the diff will include also the new changes frommaster
merged after you've checkout your branch.I've tried setting it to
base: ${{ github.ref }}
, which seems to work better as it's checks the diff with the last commit, but the problem is when you push your branch the first time. Then there's no commit to diff with, so in this case makingbase
asmaster
makes sense, just not sure how to have this condition in the workflow.Maybe someone would have some suggestions?
Edit: or maybe good solution would be to use the default
master
base, but the diff would only check new changes from the branch, but not what the branch is missing frommaster
as these changes are irrelevant and won't affect the build. Using something likegit diff --name-only <ref>...HEAD
The text was updated successfully, but these errors were encountered: