mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2026-01-12 12:18:26 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
04702edda4 | ||
|
|
1e49d5001f | ||
|
|
65c56779c9 | ||
|
|
547c1409ce | ||
|
|
8fa7f5a3c5 |
2
.github/workflows/git-auto-commit.yml
vendored
2
.github/workflows/git-auto-commit.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.head_ref }}
|
||||
|
||||
|
||||
2
.github/workflows/linter.yml
vendored
2
.github/workflows/linter.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Lint Code Base
|
||||
uses: github/super-linter@v7
|
||||
|
||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- name: Install testing dependencies
|
||||
run: yarn install
|
||||
|
||||
2
.github/workflows/update-changelog.yaml
vendored
2
.github/workflows/update-changelog.yaml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: master
|
||||
|
||||
|
||||
18
CHANGELOG.md
18
CHANGELOG.md
@@ -5,10 +5,26 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v6.0.1...HEAD)
|
||||
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v7.0.0...HEAD)
|
||||
|
||||
> TBD
|
||||
|
||||
## [v7.0.0](https://github.com/stefanzweifel/git-auto-commit-action/compare/v6.0.1...v7.0.0) - 2025-10-12
|
||||
|
||||
### Added
|
||||
|
||||
- Restore skip_fetch, skip_checkout, create_branch ([#388](https://github.com/stefanzweifel/git-auto-commit-action/pull/388)) [@stefanzweifel](https://github.com/@stefanzweifel)
|
||||
- Restore Detached State Detection ([#393](https://github.com/stefanzweifel/git-auto-commit-action/pull/393)) [@stefanzweifel](https://github.com/@stefanzweifel)
|
||||
- Add Support for Tag Messages ([#391](https://github.com/stefanzweifel/git-auto-commit-action/pull/391)) [@EliasBoulharts](https://github.com/@EliasBoulharts)
|
||||
|
||||
### Changed
|
||||
|
||||
- Run Action on Node 24 ([#389](https://github.com/stefanzweifel/git-auto-commit-action/pull/389)) [@stefanzweifel](https://github.com/@stefanzweifel)
|
||||
|
||||
### Dependency Updates
|
||||
|
||||
- Bump actions/checkout from 4 to 5 ([#386](https://github.com/stefanzweifel/git-auto-commit-action/pull/386)) [@[dependabot[bot]](https://github.com/apps/dependabot)](https://github.com/@[dependabot[bot]](https://github.com/apps/dependabot))
|
||||
|
||||
## [v6.0.1](https://github.com/stefanzweifel/git-auto-commit-action/compare/v6.0.0...v6.0.1) - 2025-06-11
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -116,6 +116,9 @@ The following is an extended example with all available options.
|
||||
# Optional. Skip internal call to `git checkout`
|
||||
skip_checkout: true
|
||||
|
||||
# Optional. Skip internal call to `git push`
|
||||
skip_push: true
|
||||
|
||||
# Optional. Prevents the shell from expanding filenames.
|
||||
# Details: https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html
|
||||
disable_globbing: true
|
||||
@@ -216,7 +219,7 @@ If this Action doesn't work for your workflow, check out [EndBug/add-and-commit]
|
||||
|
||||
### Checkout the correct branch
|
||||
|
||||
You must use `action/checkout@v2` or later versions to check out the repository.
|
||||
You must use `actions/checkout@v2` or later versions to check out the repository.
|
||||
In non-`push` events, such as `pull_request`, make sure to specify the `ref` to check out:
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -68,6 +68,10 @@ inputs:
|
||||
description: Skip the call to git-checkout.
|
||||
required: false
|
||||
default: false
|
||||
skip_push:
|
||||
description: Skip the call to git-push.
|
||||
required: false
|
||||
default: false
|
||||
disable_globbing:
|
||||
description: Stop the shell from expanding filenames (https://www.gnu.org/software/bash/manual/html_node/Filename-Expansion.html)
|
||||
default: false
|
||||
|
||||
@@ -191,6 +191,10 @@ _tag_commit() {
|
||||
}
|
||||
|
||||
_push_to_github() {
|
||||
if "$INPUT_SKIP_PUSH"; then
|
||||
_log "debug" "git-push will not be executed.";
|
||||
return
|
||||
fi
|
||||
|
||||
echo "INPUT_BRANCH value: $INPUT_BRANCH";
|
||||
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -5,15 +5,15 @@
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"bats": "^1.12.0",
|
||||
"bats": "^1.13.0",
|
||||
"bats-assert": "ztombol/bats-assert",
|
||||
"bats-support": "ztombol/bats-support"
|
||||
}
|
||||
},
|
||||
"node_modules/bats": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/bats/-/bats-1.12.0.tgz",
|
||||
"integrity": "sha512-1HTv2n+fjn3bmY9SNDgmzS6bjoKtVlSK2pIHON5aSA2xaqGkZFoCCWP46/G6jm9zZ7MCi84mD+3Byw4t3KGwBg==",
|
||||
"version": "1.13.0",
|
||||
"resolved": "https://registry.npmjs.org/bats/-/bats-1.13.0.tgz",
|
||||
"integrity": "sha512-giSYKGTOcPZyJDbfbTtzAedLcNWdjCLbXYU3/MwPnjyvDXzu6Dgw8d2M+8jHhZXSmsCMSQqCp+YBsJ603UO4vQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"bats": "^1.12.0",
|
||||
"bats": "^1.13.0",
|
||||
"bats-assert": "ztombol/bats-assert",
|
||||
"bats-support": "ztombol/bats-support"
|
||||
},
|
||||
|
||||
@@ -38,6 +38,7 @@ setup() {
|
||||
export INPUT_SKIP_DIRTY_CHECK=false
|
||||
export INPUT_SKIP_FETCH=false
|
||||
export INPUT_SKIP_CHECKOUT=false
|
||||
export INPUT_SKIP_PUSH=false
|
||||
export INPUT_DISABLE_GLOBBING=false
|
||||
export INPUT_CREATE_BRANCH=false
|
||||
export INPUT_INTERNAL_GIT_BINARY=git
|
||||
@@ -352,6 +353,24 @@ cat_github_output() {
|
||||
assert_equal $current_sha $remote_sha
|
||||
}
|
||||
|
||||
@test "If SKIP_PUSH is true git-push will not be called" {
|
||||
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-{1,2,3}.txt
|
||||
|
||||
INPUT_SKIP_PUSH=true
|
||||
|
||||
run git_auto_commit
|
||||
|
||||
assert_success
|
||||
|
||||
assert_line "::debug::git-push will not be executed."
|
||||
|
||||
# Assert that the sha values are not equal on local and remote
|
||||
current_sha="$(git rev-parse --verify --short ${FAKE_DEFAULT_BRANCH})"
|
||||
remote_sha="$(git rev-parse --verify --short origin/${FAKE_DEFAULT_BRANCH})"
|
||||
|
||||
refute [assert_equal $current_sha $remote_sha]
|
||||
}
|
||||
|
||||
@test "It can checkout a different branch" {
|
||||
# Create foo-branch and then immediately switch back to ${FAKE_DEFAULT_BRANCH}
|
||||
git checkout -b foo
|
||||
|
||||
Reference in New Issue
Block a user