Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: stefanzweifel/git-auto-commit-action
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.15.0
Choose a base ref
...
head repository: stefanzweifel/git-auto-commit-action
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.15.1
Choose a head ref
  • 3 commits
  • 3 files changed
  • 2 contributors

Commits on Sep 24, 2022

  1. Update CHANGELOG

    stefanzweifel authored and github-actions[bot] committed Sep 24, 2022
    Copy the full SHA
    cef08f2 View commit details

Commits on Sep 28, 2022

  1. Test that CRLF changes are not picked up

    This PR adds a test to confirm, that changes to CRLF are not properly detected and that the message "Working tree clean. Nothing to commit." is displayed.
    
    Setting `core.autocrlf` to `true` also has no effect here.
    
    refs #241
    stefanzweifel committed Sep 28, 2022
    Copy the full SHA
    b208f78 View commit details

Commits on Oct 10, 2022

  1. Run Action on Node16 (#247)

    closes #246
    stefanzweifel authored Oct 10, 2022
    Copy the full SHA
    fd157da View commit details
Showing with 46 additions and 2 deletions.
  1. +14 −1 CHANGELOG.md
  2. +1 −1 action.yml
  3. +31 −0 tests/git-auto-commit.bats
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -5,10 +5,23 @@ 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/v4.14.1...HEAD)
## [Unreleased](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.15.0...HEAD)

> TBD
## [v4.15.0](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.14.1...v4.15.0) - 2022-09-24

### Changed

- Expand `file_pattern`-input to an array ([#205](https://github.com/stefanzweifel/git-auto-commit-action/pull/205)) [@stefanzweifel](https://github.com/@stefanzweifel)

### Fixed

- String values in README.md extended example are now correct ([#196](https://github.com/stefanzweifel/git-auto-commit-action/pull/196)) [@karolswdev](https://github.com/@karolswdev)
- Fix Typos and grammer Errors in README ([#235](https://github.com/stefanzweifel/git-auto-commit-action/pull/235)) [@derrickleemy](https://github.com/@derrickleemy)
- Fix Typo in README ([#230](https://github.com/stefanzweifel/git-auto-commit-action/pull/230)) [@fty4](https://github.com/@fty4)
- Add missing links in the CHANGELOG ([#223](https://github.com/stefanzweifel/git-auto-commit-action/pull/223)) [@ericcornelissen](https://github.com/@ericcornelissen)

## [v4.14.1](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4.14.0...v4.14.1) - 2022-04-12

## Changed
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ outputs:
description: Full hash of the created commit. Only present if the "changes_detected" output is "true".

runs:
using: 'node12'
using: 'node16'
main: 'index.js'

branding:
31 changes: 31 additions & 0 deletions tests/git-auto-commit.bats
Original file line number Diff line number Diff line change
@@ -925,3 +925,34 @@ git_auto_commit() {
assert_line --partial "subdirectory/new-file-2.txt"
assert_line --partial "another-subdirectory/new-file-3.txt"
}

@test "fails to detect crlf change in files and does not detect change or commit changes" {
# Set autocrlf to true
cd "${FAKE_LOCAL_REPOSITORY}";
git config core.autocrlf true
run git config --get-all core.autocrlf
assert_line "true"

# Add more .txt files
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-2.txt
touch "${FAKE_LOCAL_REPOSITORY}"/new-file-3.txt

# Run git-auto-commit to add new files to repository
run git_auto_commit

# Change control characters in files
sed 's/^M$//' "${FAKE_LOCAL_REPOSITORY}"/new-file-2.txt
sed 's/$/^M/' "${FAKE_LOCAL_REPOSITORY}"/new-file-3.txt

# Run git-auto-commit to commit the 2 changes files
run git_auto_commit

assert_success

# Changes are not detected
assert_line --partial "Working tree clean. Nothing to commit."

refute_line --partial "new-file-2.txt"
refute_line --partial "new-file-3.txt"
}