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

Action will overwrite changes on target branch made after checkout #64

Open
cooperbenson-qz opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@cooperbenson-qz
Copy link
Contributor

Expected Behavior

The action doesn't de-facto revert commits made between checkout and execution of the action.

Current Behavior

Right now if a commit is made to the target branch between the workflow running @actions/checkout and commit-changes-action, commit-changes-action will commit the older version of the file (assuming the glob covers that file). This essentially results in the action reverting commits which can be counterintuitive.

Possible Solution

Best solution is probably to shell out to git and only commit files that match the glob and have changes (with an option to tune this behaviour).

Also documenting this edge case would be helpful, especially in encouraging users to tune the glob to match as few files as possible.

Context

This issue was found when changes on master were being overridden. It was fixed in the short term by tuning the glob to cover only the files the workflow had made changes to.

Your Environment

N/A will affect any environment

@cooperbenson-qz cooperbenson-qz added bug Something isn't working help wanted Extra attention is needed labels Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant