Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f1e44af6c | ||
|
|
d9be0ccb5e | ||
|
|
ff10d2fbc5 | ||
|
|
8fb90ed7f6 | ||
|
|
474e3bd363 | ||
|
|
b2902f40b3 | ||
|
|
17ae17127c | ||
|
|
65dc0e47e9 | ||
|
|
ba5abef332 | ||
|
|
84dcdf586d |
53
HISTORY.md
53
HISTORY.md
@@ -1,20 +1,25 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD)
|
## [v34.5.3](https://github.com/tj-actions/changed-files/tree/v34.5.3) (2022-12-10)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.5.2...HEAD)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.5.3)
|
||||||
|
|
||||||
|
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-12-10)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.5.2...v34)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
- \[BUG\] Error: Unable to locate the previous sha: fatal: ambiguous argument 'main': unknown revision or path not in the working tree [\#840](https://github.com/tj-actions/changed-files/issues/840)
|
- \[BUG\] Error: Unable to locate the previous sha: fatal: ambiguous argument 'main': unknown revision or path not in the working tree [\#840](https://github.com/tj-actions/changed-files/issues/840)
|
||||||
|
|
||||||
|
**Merged pull requests:**
|
||||||
|
|
||||||
|
- chore: update diff-sha.sh [\#845](https://github.com/tj-actions/changed-files/pull/845) ([jackton1](https://github.com/jackton1))
|
||||||
|
- Upgraded to v34.5.2 [\#844](https://github.com/tj-actions/changed-files/pull/844) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v34.5.2](https://github.com/tj-actions/changed-files/tree/v34.5.2) (2022-12-10)
|
## [v34.5.2](https://github.com/tj-actions/changed-files/tree/v34.5.2) (2022-12-10)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.5.2)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.5.1...v34.5.2)
|
||||||
|
|
||||||
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-12-10)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.5.1...v34)
|
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -359,7 +364,7 @@
|
|||||||
|
|
||||||
## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25)
|
## [v34.0.0](https://github.com/tj-actions/changed-files/tree/v34.0.0) (2022-10-25)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v34.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34.0.0)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -372,13 +377,13 @@
|
|||||||
- feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1))
|
- feat: add support for fetching more history [\#709](https://github.com/tj-actions/changed-files/pull/709) ([jackton1](https://github.com/jackton1))
|
||||||
- Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v33.0.0 [\#707](https://github.com/tj-actions/changed-files/pull/707) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v33)
|
|
||||||
|
|
||||||
## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21)
|
## [v33.0.0](https://github.com/tj-actions/changed-files/tree/v33.0.0) (2022-10-21)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v33.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33...v33.0.0)
|
||||||
|
|
||||||
|
## [v33](https://github.com/tj-actions/changed-files/tree/v33) (2022-10-21)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32...v33)
|
||||||
|
|
||||||
**Closed issues:**
|
**Closed issues:**
|
||||||
|
|
||||||
@@ -397,13 +402,13 @@
|
|||||||
- chore\(deps\): update tj-actions/verify-changed-files action to v12 [\#696](https://github.com/tj-actions/changed-files/pull/696) ([renovate[bot]](https://github.com/apps/renovate))
|
- chore\(deps\): update tj-actions/verify-changed-files action to v12 [\#696](https://github.com/tj-actions/changed-files/pull/696) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v32.1.2 [\#695](https://github.com/tj-actions/changed-files/pull/695) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v32.1.2 [\#695](https://github.com/tj-actions/changed-files/pull/695) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v32.1.2](https://github.com/tj-actions/changed-files/tree/v32.1.2) (2022-10-16)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32...v32.1.2)
|
|
||||||
|
|
||||||
## [v32](https://github.com/tj-actions/changed-files/tree/v32) (2022-10-16)
|
## [v32](https://github.com/tj-actions/changed-files/tree/v32) (2022-10-16)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.1...v32)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.2...v32)
|
||||||
|
|
||||||
|
## [v32.1.2](https://github.com/tj-actions/changed-files/tree/v32.1.2) (2022-10-16)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v32.1.1...v32.1.2)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
@@ -459,7 +464,7 @@
|
|||||||
|
|
||||||
## [v32.0.0](https://github.com/tj-actions/changed-files/tree/v32.0.0) (2022-10-06)
|
## [v32.0.0](https://github.com/tj-actions/changed-files/tree/v32.0.0) (2022-10-06)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v32.0.0)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v32.0.0)
|
||||||
|
|
||||||
**Merged pull requests:**
|
**Merged pull requests:**
|
||||||
|
|
||||||
@@ -470,13 +475,13 @@
|
|||||||
- chore\(deps\): update actions/checkout action to v3.1.0 [\#669](https://github.com/tj-actions/changed-files/pull/669) ([renovate[bot]](https://github.com/apps/renovate))
|
- chore\(deps\): update actions/checkout action to v3.1.0 [\#669](https://github.com/tj-actions/changed-files/pull/669) ([renovate[bot]](https://github.com/apps/renovate))
|
||||||
- Upgraded to v31.0.3 [\#667](https://github.com/tj-actions/changed-files/pull/667) ([jackton1](https://github.com/jackton1))
|
- Upgraded to v31.0.3 [\#667](https://github.com/tj-actions/changed-files/pull/667) ([jackton1](https://github.com/jackton1))
|
||||||
|
|
||||||
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02)
|
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.3...v31)
|
|
||||||
|
|
||||||
## [v31.0.3](https://github.com/tj-actions/changed-files/tree/v31.0.3) (2022-10-02)
|
## [v31.0.3](https://github.com/tj-actions/changed-files/tree/v31.0.3) (2022-10-02)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31.0.3)
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31...v31.0.3)
|
||||||
|
|
||||||
|
## [v31](https://github.com/tj-actions/changed-files/tree/v31) (2022-10-02)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v31.0.2...v31)
|
||||||
|
|
||||||
**Fixed bugs:**
|
**Fixed bugs:**
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,8 @@ Retrieve all changed files and directories relative to the target branch or the
|
|||||||
* Git submodules support.
|
* Git submodules support.
|
||||||
* No extra API calls.
|
* No extra API calls.
|
||||||
* Escaped JSON Output which can be used for running matrix jobs based on changed files.
|
* Escaped JSON Output which can be used for running matrix jobs based on changed files.
|
||||||
* List only changed directories.
|
* Optionally list only changed directories.
|
||||||
|
* Restrict the max depth of changed directories.
|
||||||
* Monorepos (Fetches only the last remote commit).
|
* Monorepos (Fetches only the last remote commit).
|
||||||
* Supports all platforms (Linux, MacOS, Windows).
|
* Supports all platforms (Linux, MacOS, Windows).
|
||||||
* [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) support
|
* [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) support
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ else
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||||
|
|
||||||
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
PREVIOUS_SHA=$(git merge-base "$PREVIOUS_SHA" "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$(git merge-base "$PREVIOUS_SHA" "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
@@ -221,19 +221,18 @@ else
|
|||||||
max_depth=$INPUT_MAX_FETCH_DEPTH
|
max_depth=$INPUT_MAX_FETCH_DEPTH
|
||||||
|
|
||||||
for ((i=0; i<max_depth; i+=depth)); do
|
for ((i=0; i<max_depth; i+=depth)); do
|
||||||
echo "Fetching $depth commits..."
|
echo "Fetching $i commits..."
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
git fetch $EXTRA_ARGS -u --progress --deepen="$depth" origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH"
|
git fetch $EXTRA_ARGS -u --progress --deepen="$i" origin +"$GITHUB_REF":refs/remotes/origin/"$CURRENT_BRANCH"
|
||||||
|
|
||||||
if git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
if git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
PREVIOUS_SHA=$(git merge-base "$TARGET_BRANCH" "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if ((i >= max_depth)); then
|
if ((i >= max_depth)); then
|
||||||
echo "::error::Unable to locate a common ancestor between $TARGET_BRANCH and $CURRENT_SHA"
|
echo "::error::Unable to locate a common ancestor between $TARGET_BRANCH and $CURRENT_BRANCH with: $PREVIOUS_SHA$DIFF$CURRENT_SHA"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user