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

Clarify commit_author input option #315

Merged
merged 2 commits into from Dec 24, 2023
Merged

Clarify commit_author input option #315

merged 2 commits into from Dec 24, 2023

Conversation

npanuhin
Copy link
Contributor

This section only shows Author <actions@github.com> as an example and never states that the default commit author will be username <username@users.noreply.github.com>. I find this a bit misleading, maybe we should add an actual email address somewhere in the description?

As discussed in #123, clarified the default behavior of commit_author input option and extended the example to include guidance on preserving the original commit author.

- name: Get last commit message
  id: last-commit
  run: |
    echo "message=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
    echo "author=$(git log -1 --pretty=\"%an <%ae>\")" >> $GITHUB_OUTPUT  # Optional: if you want to preserve the commit author

- uses: stefanzweifel/git-auto-commit-action@vN
  with:
    commit_author: ${{ steps.last-commit.outputs.author }}
    commit_message: ${{ steps.last-commit.outputs.message }}
    commit_options: '--amend --no-edit'
    push_options: '--force'
    skip_fetch: true

Feel free to point out potential changes or improvements)

README.md Outdated Show resolved Hide resolved
Copy link
Owner

@stefanzweifel stefanzweifel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stefanzweifel stefanzweifel merged commit 12f6863 into stefanzweifel:master Dec 24, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants