Review of the git-auto-commit-action

Search for a command to run...

No comments yet. Be the first to comment.
I've slowly adding more and more lua functions into my neovim configuration, and recently I noticed a pattern for a class of functions that reach out to run shell commands that can be abstracted away. https://youtu.be/8m5ipBuopPU Telegraph.nvim Check...

Kedro can have a chatty logger. While this is super nice in production so see everything that happened during a pipeline run. This can be troublesome

In 2021 I changed the way I navigate between tmux sessions big time. Now I can create, kill, switch with ease, and generally keep work separated into
People who are quick to toss team members under a bus are not well trusted or highly thought of and it will lead to some toxic team dynamics. Building Steam While collaborating on any project there are going to be decisions made that aren't necessari...

I create this blog with one person in mind, me. There are others like me This is not completely selfish, as there are likely many others out there that think similarly to me. Everyone comes from different backgrounds and varying levels of experience...

Check out the repo for git-auto-commit-action.
It's a really cool GitHub action that will automatically commit files changed during the action. I was using this to render a new readme based on a template.
This has been by far the easiest way to commit back to a repo that I have seen. Other patterns often require fully setting up the git user and everything. While it's not all that hanrd, this action already has all of that covered.
You must give it a commit message and thats it. Optionally you can configure a number of things. Its possible to configure the commit_user_name, commit_user_email, and commit_author. I often also scope the file_pattern to a certain subset of files.
If you're new to actions check out this article on using actions.
You do need to be careful to checkout the repo just a bit different than normal.
directly from the repo
You must use action/checkout@v2 or later versions to checkout the repository. In non-push events, such as pull_request, make sure to specify the ref to checkout:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
You have to do this do avoid that the checkout-Action clones your repository in a detached state.
from the repo
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Required
commit_message: Apply automatic changes
# Optional branch to push to, defaults to the current branch
branch: feature-123
# Optional options appended to `git-commit`
# See https://git-scm.com/docs/git-commit for a list of available options
commit_options: '--no-verify --signoff'
# Optional glob pattern of files which should be added to the commit
# See the `pathspec`-documentation for git
# - https://git-scm.com/docs/git-add#Documentation/git-add.txt-ltpathspecgt82308203
# - https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec
file_pattern: src/*.js tests/*.js
# Optional local file path to the repository
repository: .
# Optional commit user and author settings
commit_user_name: My GitHub Actions Bot
commit_user_email: [email protected]
commit_author: Author <[email protected]>
# Optional tag message
# Action will create and push a new tag to the remote repository and the defined branch
tagging_message: 'v1.0.0'
# Optional options appended to `git-push`
push_options: '--force'
# Optional: Disable dirty check and always try to create a commit and push
skip_dirty_check: true
If you're new to actions check out this article on using actions.
|
|
| I have been writing short snippets about my mentality breaking into the tech/data industry in my newsletter, š check it out and lets get the conversation started. | |||||
|
|||||
| š see an issue, edit this post on GitHub |