diff --git a/HISTORY.md b/HISTORY.md index fc90b736ae7..698c8b2bdbf 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -2,12 +2,33 @@ ## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD) -[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.4...HEAD) +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.5...HEAD) + +**Fixed bugs:** + +- \[BUG\] since\_last\_remote\_commit does not work in v29.0.4 [\#623](https://github.com/tj-actions/changed-files/issues/623) + +## [v29.0.5](https://github.com/tj-actions/changed-files/tree/v29.0.5) (2022-09-13) + +[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.4...v29.0.5) **Fixed bugs:** - \[BUG\] Unable to fetch file changes on merge event [\#615](https://github.com/tj-actions/changed-files/issues/615) +**Closed issues:** + +- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27) + +**Merged pull requests:** + +- fix: bug with last remote commit sha [\#624](https://github.com/tj-actions/changed-files/pull/624) ([jackton1](https://github.com/jackton1)) +- chore: update README.md [\#622](https://github.com/tj-actions/changed-files/pull/622) ([jackton1](https://github.com/jackton1)) +- chore\(deps\): update tj-actions/github-changelog-generator action to v1.15 [\#621](https://github.com/tj-actions/changed-files/pull/621) ([renovate[bot]](https://github.com/apps/renovate)) +- feat: warn when since/until inputs are set but not corresponding sha is found [\#620](https://github.com/tj-actions/changed-files/pull/620) ([jackton1](https://github.com/jackton1)) +- chore: update readme [\#619](https://github.com/tj-actions/changed-files/pull/619) ([jackton1](https://github.com/jackton1)) +- Upgraded to v29.0.4 [\#618](https://github.com/tj-actions/changed-files/pull/618) ([jackton1](https://github.com/jackton1)) + ## [v29.0.4](https://github.com/tj-actions/changed-files/tree/v29.0.4) (2022-09-08) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.3...v29.0.4) @@ -51,10 +72,6 @@ - \[BUG\] dir\_names = true not returning directories with changed files [\#598](https://github.com/tj-actions/changed-files/issues/598) -**Closed issues:** - -- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27) - **Merged pull requests:** - chore: remove unused input [\#603](https://github.com/tj-actions/changed-files/pull/603) ([jackton1](https://github.com/jackton1)) diff --git a/README.md b/README.md index 4f9203948d6..bdf1ac828a9 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ jobs: # Example 1 - name: Get changed files id: changed-files - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 - name: List all changed files run: | @@ -81,7 +81,7 @@ jobs: # Example 2 - name: Get changed files in the docs folder id: changed-files-specific - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: files: | docs/** @@ -178,11 +178,11 @@ Support this project with a :star: - name: Get changed files using defaults id: changed-files - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 - name: Get changed files using a comma separator id: changed-files-comma - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: separator: "," @@ -204,7 +204,7 @@ Support this project with a :star: - name: Get specific changed files id: changed-files-specific - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: files: | my-file.txt @@ -245,14 +245,14 @@ Support this project with a :star: - name: Use a source file or list of file(s) to populate to files input. id: changed-files-specific-source-file - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: files_from_source_file: | test/changed-files-list.txt - name: Use a source file or list of file(s) to populate to files input and optionally specify more files. id: changed-files-specific-source-file-and-specify-files - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: files_from_source_file: | test/changed-files-list.txt @@ -261,13 +261,13 @@ Support this project with a :star: - name: Use a different commit SHA id: changed-files-custom-sha - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: sha: ${{ github.event.pull_request.head.sha }} - name: Use a different base SHA id: changed-files-custom-base-sha - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: base_sha: ${{ github.event.pull_request.base.sha }} @@ -279,7 +279,7 @@ Support this project with a :star: - name: Run changed-files with defaults on the dir1 id: changed-files-for-dir1 - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: path: dir1 @@ -291,19 +291,19 @@ Support this project with a :star: - name: Run changed-files using the last commit on the remote branch id: changed-files-since-last-remote-commit - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: since_last_remote_commit: "true" - name: Run changed-files using the fork point of a pull request id: changed-files-fork-point - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: use_fork_point: "true" - name: Run changed-files with quotepath disabled id: changed-files-quotepath - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: quotepath: "false" @@ -325,7 +325,7 @@ Support this project with a :star: - name: Run changed-files with the commit of the last successful test workflow run id: changed-files-base-sha-push - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }} @@ -346,32 +346,32 @@ Support this project with a :star: - name: Run changed-files with the commit of the last successful test workflow run on main if: github.event_name == 'pull_request' id: changed-files-base-sha-pull-request - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: base_sha: ${{ steps.last_successful_commit_pull_request.outputs.commit_hash }} - name: Run changed-files with dir_names id: changed-files-dir-names - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: dir_names: "true" # All outputs are JSON formatted arrays and can be used in other actions and matrix compatible jobs. - name: Run changed-files with json output id: changed-files-json - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: json: "true" - name: Run changed-files since 2022-08-19 id: changed-files-since - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: since: "2022-08-19" - name: Run changed-files until 2022-08-20 id: changed-files-until - uses: tj-actions/changed-files@v29.0.4 + uses: tj-actions/changed-files@v29.0.5 with: until: "2022-08-20" ``` diff --git a/action.yml b/action.yml index 1c3078e8d3b..3e9f5b231d1 100644 --- a/action.yml +++ b/action.yml @@ -166,7 +166,7 @@ runs: echo "::set-output name=base_sha::${{ inputs.base_sha }}" elif [[ "${{ inputs.since_last_remote_commit }}" == "true" ]]; then LAST_REMOTE_COMMIT="${{ github.event.before }}" - if [[ -z "$LAST_REMOTE_COMMIT" ]]; then + if [[ -z "$LAST_REMOTE_COMMIT" && "$LAST_REMOTE_COMMIT" != "0000000000000000000000000000000000000000" ]]; then LAST_REMOTE_COMMIT=$(git rev-parse $(git branch -r --sort=-committerdate | head -1)) fi if [[ "${{ inputs.sha }}" == "$LAST_REMOTE_COMMIT" ]]; then