Compare commits

...

22 Commits

Author SHA1 Message Date
repo-ranger[bot]
3ebdc42d8b Merge pull request #804 from tj-actions/fix/bug-finding-merge-base
fix: finding merge-base
2022-11-15 17:16:30 +00:00
repo-ranger[bot]
747f9e656c Merge branch 'main' into fix/bug-finding-merge-base 2022-11-15 16:44:39 +00:00
Tonye Jack
9d429cc7ac Merge pull request #805 from tj-actions/chore/update-sync-release-version-yml
chore: update sync-release-version.yml
2022-11-15 09:43:25 -07:00
Tonye Jack
b04424611d chore: update sync-release-version.yml 2022-11-15 09:41:55 -07:00
Tonye Jack
4f5723a9fe fix: finding merge-base 2022-11-15 09:31:41 -07:00
Tonye Jack
d362fea453 Merge pull request #800 from tj-actions/upgrade-to-v34.4.0 2022-11-11 09:58:40 -07:00
jackton1
22ede94fe5 Upgraded from v34.3.4 -> v34.4.0 2022-11-11 16:47:16 +00:00
repo-ranger[bot]
94e6fba8d8 Merge pull request #799 from tj-actions/chore/update-test
chore: update test
2022-11-11 16:02:44 +00:00
Tonye Jack
61fb39f691 Update test.yml 2022-11-11 08:46:24 -07:00
Tonye Jack
9478e36442 chore: update test 2022-11-11 08:21:05 -07:00
repo-ranger[bot]
e6bd87aabe Merge pull request #798 from tj-actions/feat/update-retrieving-merge-base
feat: skip merge-base check for non shallow clones and fallback to using --fork-point
2022-11-11 15:13:59 +00:00
Tonye Jack
443b6c32e7 Show progress 2022-11-11 07:47:09 -07:00
Tonye Jack
56a01f8a9e Update arguments 2022-11-11 07:44:25 -07:00
Tonye Jack
2e4e636392 Updated the retrieving the merge-base 2022-11-11 07:39:00 -07:00
Tonye Jack
c21087a6bb updated test 2022-11-11 07:33:01 -07:00
Tonye Jack
ac07453ae9 feat: skip merge-base check for non shallow clones and fallback to using --fork-point 2022-11-11 07:28:34 -07:00
Tonye Jack
43835a2749 Merge pull request #796 from tj-actions/chore/update-bug-issue-template
chore: update bug issue template
2022-11-09 18:43:37 -07:00
Tonye Jack
36f5714273 chore: update bug issue template 2022-11-09 13:37:12 -07:00
Tonye Jack
d48d7b71f5 Merge pull request #793 from tj-actions/chore/update-readme
chore: update readme
2022-11-08 14:19:45 -07:00
Tonye Jack
b82208d0c1 Merge pull request #794 from tj-actions/upgrade-to-v34.3.4
Upgraded to v34.3.4
2022-11-08 14:19:30 -07:00
jackton1
9f7a99a9af Upgraded from v34.3.3 -> v34.3.4 2022-11-08 20:47:19 +00:00
Tonye Jack
a37f1b1575 chore: update readme 2022-11-08 13:24:38 -07:00
6 changed files with 72 additions and 33 deletions

View File

@@ -69,13 +69,14 @@ body:
id: logs id: logs
attributes: attributes:
label: Relevant log output label: Relevant log output
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. description: Please copy and paste any relevant log output which is obtained after enabling debug logging. This will be automatically formatted into code, so no need for backticks.
placeholder: | placeholder: |
This can be achieved by:
1. Re-running the workflow with debug logging enabled. 1. Re-running the workflow with debug logging enabled.
2. Copy or download the log archive. 2. Copy or download the log archive.
3. Paste the contents here or upload the file in a subsequent comment. 3. Paste the contents here or upload the file in a subsequent comment.
render: shell render: shell
validations:
required: true
- type: textarea - type: textarea
attributes: attributes:
label: Anything else? label: Anything else?

View File

@@ -1,5 +1,8 @@
name: Update release version. name: Update release version.
on: on:
push:
tags:
- '**'
release: release:
types: [published] types: [published]

View File

@@ -33,7 +33,7 @@ jobs:
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
strategy: strategy:
fail-fast: false fail-fast: false
max-parallel: 4 max-parallel: 2
matrix: matrix:
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022] platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
steps: steps:
@@ -90,7 +90,7 @@ jobs:
if: github.event_name == 'push' if: github.event_name == 'push'
strategy: strategy:
fail-fast: false fail-fast: false
max-parallel: 4 max-parallel: 2
matrix: matrix:
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022] platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
@@ -299,7 +299,7 @@ jobs:
uses: ./ uses: ./
continue-on-error: true continue-on-error: true
with: with:
base_sha: "4554456" sha: "4774456"
- name: Show output - name: Show output
run: | run: |
@@ -319,7 +319,7 @@ jobs:
continue-on-error: true continue-on-error: true
with: with:
files: action.yml files: action.yml
base_sha: "4554456" sha: "4774456"
- name: Show output - name: Show output
run: | run: |

View File

@@ -1,12 +1,40 @@
# Changelog # Changelog
## [v34.4.0](https://github.com/tj-actions/changed-files/tree/v34.4.0) (2022-11-11)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.4.0)
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-11)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.4...v34)
**Fixed bugs:**
- \[BUG\] Very simple branch gives: "Unable to find merge-base between main and HEAD." [\#797](https://github.com/tj-actions/changed-files/issues/797)
- \[BUG\] Specfic File Bug in v33 / v34 - grep: : No such file or directory [\#795](https://github.com/tj-actions/changed-files/issues/795)
- \[BUG\] Please verify that the previous sha is valid, and increase the fetch\_depth to a number higher than 40. [\#790](https://github.com/tj-actions/changed-files/issues/790)
**Merged pull requests:**
- chore: update test [\#799](https://github.com/tj-actions/changed-files/pull/799) ([jackton1](https://github.com/jackton1))
- feat: skip merge-base check for non shallow clones and fallback to using --fork-point [\#798](https://github.com/tj-actions/changed-files/pull/798) ([jackton1](https://github.com/jackton1))
- chore: update bug issue template [\#796](https://github.com/tj-actions/changed-files/pull/796) ([jackton1](https://github.com/jackton1))
- Upgraded to v34.3.4 [\#794](https://github.com/tj-actions/changed-files/pull/794) ([jackton1](https://github.com/jackton1))
- chore: update readme [\#793](https://github.com/tj-actions/changed-files/pull/793) ([jackton1](https://github.com/jackton1))
## [v34.3.4](https://github.com/tj-actions/changed-files/tree/v34.3.4) (2022-11-08)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.3...v34.3.4)
**Merged pull requests:**
- Updated README.md [\#792](https://github.com/tj-actions/changed-files/pull/792) ([jackton1](https://github.com/jackton1))
- fix: re-add ability to change the max fetch depth [\#791](https://github.com/tj-actions/changed-files/pull/791) ([jackton1](https://github.com/jackton1))
- Upgraded to v34.3.3 [\#788](https://github.com/tj-actions/changed-files/pull/788) ([jackton1](https://github.com/jackton1))
## [v34.3.3](https://github.com/tj-actions/changed-files/tree/v34.3.3) (2022-11-08) ## [v34.3.3](https://github.com/tj-actions/changed-files/tree/v34.3.3) (2022-11-08)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.3.3) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.1...v34.3.3)
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-08)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.1...v34)
**Fixed bugs:** **Fixed bugs:**
@@ -209,7 +237,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:**
@@ -222,13 +250,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.1.2...v33)
**Closed issues:** **Closed issues:**

View File

@@ -612,7 +612,7 @@ Report bugs at https://github.com/tj-actions/changed-files/issues.
If you are reporting a bug, please include: If you are reporting a bug, please include:
* Your operating system name and version. * Your operating system name and version.
* Any details about your workflow that might be helpful in troubleshooting. * Any details about your workflow that might be helpful in troubleshooting. (**NOTE**: Ensure that you include full log outputs with debugging enabled)
* Detailed steps to reproduce the bug. * Detailed steps to reproduce the bug.
## Contributors ✨ ## Contributors ✨

View File

@@ -150,22 +150,8 @@ else
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then
# shellcheck disable=SC2086 # shellcheck disable=SC2086
git fetch $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" git fetch -u --progress $EXTRA_ARGS --depth="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH"
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 2>/dev/null || true git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 2>/dev/null || true
depth=$INPUT_FETCH_DEPTH
while [ -z "$( git merge-base "$TARGET_BRANCH" HEAD )" ]; do
# shellcheck disable=SC2086
git fetch $EXTRA_ARGS --deepen="$depth" origin "$TARGET_BRANCH" HEAD;
depth=$((depth * 10))
max_depth=$INPUT_MAX_FETCH_DEPTH
if [[ $depth -gt $max_depth ]]; then
echo "::error::Unable to find merge-base between $TARGET_BRANCH and HEAD."
exit 1
fi
done
fi fi
echo "::debug::Getting HEAD SHA..." echo "::debug::Getting HEAD SHA..."
@@ -223,6 +209,27 @@ else
echo "::debug::Target branch: $TARGET_BRANCH" echo "::debug::Target branch: $TARGET_BRANCH"
echo "::debug::Current branch: $CURRENT_BRANCH" echo "::debug::Current branch: $CURRENT_BRANCH"
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "false" ]]; then
if [[ -f .git/shallow ]]; then
depth=$INPUT_FETCH_DEPTH
max_depth=$INPUT_MAX_FETCH_DEPTH
while [ -z "$( git merge-base --fork-point "$TARGET_BRANCH" "$CURRENT_SHA" )" ] || [ -z "$(git merge-base "$TARGET_BRANCH" "$CURRENT_SHA")" ] || [ -z "$(git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA"..."$CURRENT_SHA" | head -1)" ]; do
depth=$((depth + 300))
# shellcheck disable=SC2086
git fetch $EXTRA_ARGS --deepen="$depth" origin "$TARGET_BRANCH" HEAD;
if [[ $depth -gt $max_depth ]]; then
echo "::error::Unable to locate a common ancestor between $TARGET_BRANCH and HEAD"
exit 1
fi
done
else
echo "::debug::Not a shallow clone, skipping merge-base check."
fi
fi
echo "::debug::Verifying the previous commit SHA: $PREVIOUS_SHA" echo "::debug::Verifying the previous commit SHA: $PREVIOUS_SHA"
git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$? git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?