Compare commits

..

3 Commits
v22.1 ... v22.2

Author SHA1 Message Date
Tonye Jack
ae90a0b602 Updated README.md (#516)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2022-06-02 12:15:18 -04:00
Tonye Jack
3538a9c448 feat: add support for configuring diff.relative (#515)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-02 12:13:45 -04:00
Tonye Jack
3ea81e414c Upgraded to v22.1 (#514)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2022-05-31 13:32:40 -04:00
4 changed files with 39 additions and 21 deletions

View File

@@ -1,5 +1,14 @@
# Changelog
## [v22.1](https://github.com/tj-actions/changed-files/tree/v22.1) (2022-05-31)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v22...v22.1)
**Merged pull requests:**
- chore: upgrade tj-actions/glob from v9 to v9.2 [\#513](https://github.com/tj-actions/changed-files/pull/513) ([jackton1](https://github.com/jackton1))
- Upgraded to v22 [\#512](https://github.com/tj-actions/changed-files/pull/512) ([jackton1](https://github.com/jackton1))
## [v22](https://github.com/tj-actions/changed-files/tree/v22) (2022-05-31)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v21...v22)
@@ -705,7 +714,7 @@
## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v1.2.1)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.1)
**Implemented enhancements:**
@@ -719,13 +728,13 @@
- Update actions/checkout action to v2.4.0 [\#243](https://github.com/tj-actions/changed-files/pull/243) ([renovate[bot]](https://github.com/apps/renovate))
- Upgraded to v11.5 [\#241](https://github.com/tj-actions/changed-files/pull/241) ([jackton1](https://github.com/jackton1))
## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.5...v1.2.0)
## [v11.5](https://github.com/tj-actions/changed-files/tree/v11.5) (2021-10-30)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v11.5)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v11.5)
## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v1.2.0)
**Merged pull requests:**

View File

@@ -67,7 +67,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
- name: List all changed files
run: |
@@ -144,6 +144,7 @@ Support this project with a :star:
| since\_last\_remote\_commit | `boolean` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha` <br> (Defaults to the last commit <br> on the target branch for Pull requests <br> or the previous commit <br> on the current branch <br> for push events). <br /> NOTE: This requires <br /> `fetch-depth: 0` <br /> with `actions/checkout@v2` |
| use\_fork\_point | `boolean` | `false` | `false` | Finds best common ancestor <br /> between two commits <br /> to use in a three-way merge <br /> as the `base_sha` <br /> See: [git merge-base](https://git-scm.com/docs/git-merge-base#Documentation/git-merge-base.txt---fork-point). <br> NOTE: This pulls the entire commit history of the base branch |
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
| diff\_relative | `boolean` | `false` | | Exclude changes outside the current directory and show pathnames relative to it. |
## Examples
@@ -157,11 +158,11 @@ Support this project with a :star:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
with:
separator: ","
@@ -183,7 +184,7 @@ Support this project with a :star:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
with:
files: |
my-file.txt
@@ -224,14 +225,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@v22
uses: tj-actions/changed-files@v22.1
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@v22
uses: tj-actions/changed-files@v22.1
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -240,13 +241,13 @@ Support this project with a :star:
- name: Use a different commit SHA
id: changed-files-custom-sha
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
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@v22
uses: tj-actions/changed-files@v22.1
with:
base_sha: "2096ed0"
@@ -258,7 +259,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@v22
uses: tj-actions/changed-files@v22.1
with:
path: dir1
@@ -270,19 +271,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@v22
uses: tj-actions/changed-files@v22.1
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@v22
uses: tj-actions/changed-files@v22.1
with:
use_fork_point: "true"
- name: Run changed-files with quotepath disabled
id: changed-files-quotepath
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
with:
quotepath: "false"
@@ -304,7 +305,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@v22
uses: tj-actions/changed-files@v22.1
with:
base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }}
@@ -325,7 +326,7 @@ 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@v22
uses: tj-actions/changed-files@v22.1
with:
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.commit_hash }}
@@ -379,7 +380,7 @@ With the switch from using grep's Extended regex to match files to the natively
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v22
uses: tj-actions/changed-files@v22.1
with:
files: |
*.sh

View File

@@ -70,6 +70,9 @@ inputs:
description: 'Output filenames completely verbatim by setting this to false'
default: 'true'
required: false
diff_relative:
description: 'Exclude changes outside the current directory and show pathnames relative to it'
required: false
outputs:
added_files:
@@ -203,6 +206,7 @@ runs:
INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES: ${{ inputs.include_all_old_new_renamed_files }}
INPUT_OLD_NEW_SEPARATOR: ${{ inputs.old_new_separator }}
INPUT_OLD_NEW_FILES_SEPARATOR: ${{ inputs.old_new_files_separator }}
INPUT_DIFF_RELATIVE: ${{ inputs.diff_relative }}
branding:
icon: file-text

View File

@@ -12,6 +12,10 @@ else
git config --global core.quotepath on
fi
if [[ -n $INPUT_DIFF_RELATIVE ]]; then
git config --global diff.relative "$INPUT_DIFF_RELATIVE"
fi
function get_diff() {
base="$1"
sha="$2"