Skip to content

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

@cooperbenson-qz

Description

@cooperbenson-qz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions