Skip to content

Output hash of created commit #171

@webignition

Description

@webignition

Is your feature request related to a problem? Please describe.
I often need the hash of the commit that has been created, commonly to pass to another workflow to allow a release for the given hash to be created.

Describe the solution you'd like
Add a commit_hash output that is populated with the full hash of the commit that was created. This needs only to be present when changes_detected is "true".

Describe alternatives you've considered
I often have a step that follows a use of stefanzweifel/git-auto-commit-action with a line that sets the commit hash for subsequent consumption (echo "::set-output name=value::$(git rev-parse HEAD)").

It would be nice for auto-commit-action to expose this for me since knowledge of the hash could somewhat be argued as being the responsibility of the tool that created the commit.

Additional context
I've implemented the change in a fork, along with relevant updates to the tests. I will be creating a PR soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions