Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c0dba81990 | ||
|
|
3eda4784bb | ||
|
|
b719970c0b | ||
|
|
68651bf651 | ||
|
|
d4982767f9 | ||
|
|
aa6e536bdb | ||
|
|
515a44abdb | ||
|
|
bbda4a813a | ||
|
|
a81ed2173e | ||
|
|
e3e15baf50 | ||
|
|
225624ef26 | ||
|
|
7d60fe14e4 | ||
|
|
357d0e1dee | ||
|
|
2c5f9483f5 | ||
|
|
2e4c654d24 |
2
.github/workflows/greetings.yml
vendored
2
.github/workflows/greetings.yml
vendored
@@ -10,4 +10,4 @@ jobs:
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
issue-message: "Thanks for reporting this issue, don't forget to star this project to help us reach a wider audience."
|
||||
pr-message: "Thanks for implementing a fix. Could you ensure that the test covers your changes."
|
||||
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes."
|
||||
|
||||
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: Checkout to branch
|
||||
uses: actions/checkout@v2
|
||||
- name: shellcheck
|
||||
uses: reviewdog/action-shellcheck@v1.13
|
||||
uses: reviewdog/action-shellcheck@v1.14
|
||||
|
||||
test-multiple-repositories:
|
||||
name: Test with multiple repositories
|
||||
|
||||
54
HISTORY.md
54
HISTORY.md
@@ -1,5 +1,47 @@
|
||||
# Changelog
|
||||
|
||||
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.0.6...HEAD)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
- \[BUG\] Wrong files returned for Pull Requests [\#355](https://github.com/tj-actions/changed-files/issues/355)
|
||||
|
||||
## [v4.0.6](https://github.com/tj-actions/changed-files/tree/v4.0.6) (2022-02-12)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v14.5...v4.0.6)
|
||||
|
||||
**Closed issues:**
|
||||
|
||||
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Update README.md [\#360](https://github.com/tj-actions/changed-files/pull/360) ([jackton1](https://github.com/jackton1))
|
||||
- Update README.md [\#359](https://github.com/tj-actions/changed-files/pull/359) ([jackton1](https://github.com/jackton1))
|
||||
- fix: Error with multiple changed files from merge commits [\#358](https://github.com/tj-actions/changed-files/pull/358) ([jackton1](https://github.com/jackton1))
|
||||
- Update tj-actions/glob action to v7 [\#357](https://github.com/tj-actions/changed-files/pull/357) ([renovate[bot]](https://github.com/apps/renovate))
|
||||
- Update reviewdog/action-shellcheck action to v1.14 [\#356](https://github.com/tj-actions/changed-files/pull/356) ([renovate[bot]](https://github.com/apps/renovate))
|
||||
- Upgraded to v14.5 [\#352](https://github.com/tj-actions/changed-files/pull/352) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v14.5](https://github.com/tj-actions/changed-files/tree/v14.5) (2022-02-10)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.0.5...v14.5)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- Upgraded to v4.0.5 [\#351](https://github.com/tj-actions/changed-files/pull/351) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v4.0.5](https://github.com/tj-actions/changed-files/tree/v4.0.5) (2022-02-10)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v14.4...v4.0.5)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
- feat: Add support for detecting submodules changes [\#350](https://github.com/tj-actions/changed-files/pull/350) ([jackton1](https://github.com/jackton1))
|
||||
- Upgraded to v14.4 [\#348](https://github.com/tj-actions/changed-files/pull/348) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v14.4](https://github.com/tj-actions/changed-files/tree/v14.4) (2022-02-08)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v4.0.4...v14.4)
|
||||
@@ -111,7 +153,7 @@
|
||||
|
||||
## [v3.0.2](https://github.com/tj-actions/changed-files/tree/v3.0.2) (2022-01-25)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.1...v3.0.2)
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v13.1...v3.0.2)
|
||||
|
||||
**Fixed bugs:**
|
||||
|
||||
@@ -129,17 +171,13 @@
|
||||
- Upgraded to v13.1 [\#316](https://github.com/tj-actions/changed-files/pull/316) ([jackton1](https://github.com/jackton1))
|
||||
- Upgraded to v3.0.1 [\#315](https://github.com/tj-actions/changed-files/pull/315) ([jackton1](https://github.com/jackton1))
|
||||
|
||||
## [v3.0.1](https://github.com/tj-actions/changed-files/tree/v3.0.1) (2022-01-09)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v13.1...v3.0.1)
|
||||
|
||||
## [v13.1](https://github.com/tj-actions/changed-files/tree/v13.1) (2022-01-09)
|
||||
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.0...v13.1)
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.1...v13.1)
|
||||
|
||||
**Closed issues:**
|
||||
## [v3.0.1](https://github.com/tj-actions/changed-files/tree/v3.0.1) (2022-01-09)
|
||||
|
||||
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
|
||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v3.0.0...v3.0.1)
|
||||
|
||||
**Merged pull requests:**
|
||||
|
||||
|
||||
23
README.md
23
README.md
@@ -20,6 +20,7 @@ Retrieve all changed files relative to the default branch (`pull_request*` based
|
||||
* Fast execution (0-2 seconds on average).
|
||||
* Easy to debug.
|
||||
* Boolean output indicating that certain files have been changed.
|
||||
* Git submodules (TODO)
|
||||
* Multiple repositories support.
|
||||
* [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) support
|
||||
* [GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.3/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server) support.
|
||||
@@ -65,7 +66,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
|
||||
- name: List all changed files
|
||||
run: |
|
||||
@@ -143,11 +144,11 @@ Support this project with a :star:
|
||||
|
||||
- name: Get changed files using defaults
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
|
||||
- name: Get changed files using a comma separator
|
||||
id: changed-files-comma
|
||||
uses: tj-actions/changed-files@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
with:
|
||||
separator: ","
|
||||
|
||||
@@ -169,7 +170,7 @@ Support this project with a :star:
|
||||
|
||||
- name: Get specific changed files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -208,14 +209,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@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
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@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
with:
|
||||
files_from_source_file: |
|
||||
test/changed-files-list.txt
|
||||
@@ -224,13 +225,13 @@ Support this project with a :star:
|
||||
|
||||
- name: Use a different commit SHA
|
||||
id: changed-files-custom-sha
|
||||
uses: tj-actions/changed-files@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
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@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
with:
|
||||
base_sha: "2096ed0"
|
||||
|
||||
@@ -242,7 +243,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@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
with:
|
||||
path: dir1
|
||||
|
||||
@@ -254,7 +255,7 @@ 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@v14.4
|
||||
uses: tj-actions/changed-files@v4.0.6
|
||||
with:
|
||||
since_last_remote_commit: "true"
|
||||
|
||||
@@ -268,7 +269,7 @@ Support this project with a :star:
|
||||
|
||||
> NOTE: :warning:
|
||||
>
|
||||
> * Spaces in file names can introduce bugs when using bash loops. See: [Issue #216](https://github.com/tj-actions/changed-files/issues/216)
|
||||
> * Spaces in file names can introduce bugs when using bash loops. See: [#216](https://github.com/tj-actions/changed-files/issues/216)
|
||||
> * However, this action will handle spaces in file names, with a recommendation of using a separator to prevent hidden issues.
|
||||
> 
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ runs:
|
||||
id: base-sha
|
||||
shell: bash
|
||||
- name: Glob match
|
||||
uses: tj-actions/glob@v6
|
||||
uses: tj-actions/glob@v7
|
||||
id: glob
|
||||
with:
|
||||
files: ${{ inputs.files }}
|
||||
|
||||
@@ -33,7 +33,7 @@ fi
|
||||
echo "Getting HEAD info..."
|
||||
|
||||
if [[ -z $INPUT_SHA ]]; then
|
||||
CURRENT_SHA=$(git rev-parse HEAD 2>&1) && exit_status=$? || exit_status=$?
|
||||
CURRENT_SHA=$(git rev-list --no-merges -n 1 HEAD 2>&1) && exit_status=$? || exit_status=$?
|
||||
else
|
||||
CURRENT_SHA=$INPUT_SHA && exit_status=$? || exit_status=$?
|
||||
fi
|
||||
@@ -52,7 +52,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
||||
CURRENT_BRANCH=$TARGET_BRANCH
|
||||
|
||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||
PREVIOUS_SHA=$(git rev-parse HEAD^1 2>&1) && exit_status=$? || exit_status=$?
|
||||
PREVIOUS_SHA=$(git rev-list --no-merges -n 1 HEAD^1 2>&1) && exit_status=$? || exit_status=$?
|
||||
else
|
||||
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||
@@ -72,7 +72,7 @@ else
|
||||
|
||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||
git fetch --no-tags -u --progress --depth=1 temp_changed_files "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
|
||||
PREVIOUS_SHA=$(git rev-parse "${TARGET_BRANCH}" 2>&1) && exit_status=$? || exit_status=$?
|
||||
PREVIOUS_SHA=$(git rev-list --no-merges -n 1 "${TARGET_BRANCH}" 2>&1) && exit_status=$? || exit_status=$?
|
||||
else
|
||||
git fetch --no-tags -u --progress --depth=1 temp_changed_files "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$?
|
||||
PREVIOUS_SHA=$INPUT_BASE_SHA
|
||||
|
||||
Reference in New Issue
Block a user