Compare commits

...

10 Commits

Author SHA1 Message Date
Tonye Jack
991e8b3aae Merge pull request #787 from tj-actions/fix/bug-with-force-pushing-commits-to-pr-branches 2022-11-08 11:26:37 -07:00
Tonye Jack
420a7792d0 fix: bug with force pushing commits to pr branches 2022-11-08 11:06:59 -07:00
renovate[bot]
e062ae86aa chore(deps): update tj-actions/glob action to v16 2022-11-08 10:41:17 -07:00
Tonye Jack
6326c61a70 Merge pull request #786 from tj-actions/fix/bug-with-invalid-branch-name 2022-11-08 09:43:38 -07:00
Tonye Jack
eea929be22 fixed the test 2022-11-08 09:31:21 -07:00
Tonye Jack
9962dc418e fix: bug with invalid branch name 2022-11-08 09:00:45 -07:00
Tonye Jack
77f03d2bb5 Merge pull request #784 from tj-actions/chore/update-readme 2022-11-07 15:19:23 -07:00
Tonye Jack
a236f54cc9 chore: update readme 2022-11-07 15:07:54 -07:00
Tonye Jack
de6d1ed419 Merge pull request #781 from tj-actions/upgrade-to-v34.3.2
Upgraded to v34.3.2
2022-11-07 12:02:43 -07:00
jackton1
5345fb6b0e Upgraded from v34.3.0 -> v34.3.2 2022-11-07 17:11:10 +00:00
5 changed files with 40 additions and 19 deletions

View File

@@ -127,9 +127,9 @@ jobs:
until: "2022-08-20" until: "2022-08-20"
- name: Check output - name: Check output
if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'entrypoint.sh')" if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'README.md')"
run: | run: |
echo "Invalid output: Expected to include (entrypoint.sh) got (${{ steps.changed-files-until.outputs.all_changed_files }})" echo "Invalid output: Expected to include (README.md) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
exit 1 exit 1
shell: shell:
bash bash

View File

@@ -1,12 +1,30 @@
# Changelog # Changelog
## [v34.3.0](https://github.com/tj-actions/changed-files/tree/v34.3.0) (2022-11-07) ## [v34.3.2](https://github.com/tj-actions/changed-files/tree/v34.3.2) (2022-11-07)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.3.0) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.1...v34.3.2)
## [v34.3.1](https://github.com/tj-actions/changed-files/tree/v34.3.1) (2022-11-07)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.3.1)
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-07) ## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-11-07)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.2...v34) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.3.0...v34)
**Fixed bugs:**
- \[BUG\] Similar commit hashes detected: previous sha: abc123 is equivalent to the current sha: abc123 on PR merge [\#778](https://github.com/tj-actions/changed-files/issues/778)
**Merged pull requests:**
- fix: similar commit hashes [\#780](https://github.com/tj-actions/changed-files/pull/780) ([jackton1](https://github.com/jackton1))
- chore: update readme [\#779](https://github.com/tj-actions/changed-files/pull/779) ([jackton1](https://github.com/jackton1))
- Upgraded to v34.3.0 [\#777](https://github.com/tj-actions/changed-files/pull/777) ([jackton1](https://github.com/jackton1))
## [v34.3.0](https://github.com/tj-actions/changed-files/tree/v34.3.0) (2022-11-07)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.2.2...v34.3.0)
**Closed issues:** **Closed issues:**
@@ -350,7 +368,7 @@
## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24) ## [v30](https://github.com/tj-actions/changed-files/tree/v30) (2022-09-24)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v30) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v30)
**Fixed bugs:** **Fixed bugs:**
@@ -366,13 +384,13 @@
- chore\(deps\): update codacy/codacy-analysis-cli-action action to v4.2.0 [\#634](https://github.com/tj-actions/changed-files/pull/634) ([renovate[bot]](https://github.com/apps/renovate)) - chore\(deps\): update codacy/codacy-analysis-cli-action action to v4.2.0 [\#634](https://github.com/tj-actions/changed-files/pull/634) ([renovate[bot]](https://github.com/apps/renovate))
- Upgraded to v29.0.9 [\#633](https://github.com/tj-actions/changed-files/pull/633) ([jackton1](https://github.com/jackton1)) - Upgraded to v29.0.9 [\#633](https://github.com/tj-actions/changed-files/pull/633) ([jackton1](https://github.com/jackton1))
## [v29.0.9](https://github.com/tj-actions/changed-files/tree/v29.0.9) (2022-09-20)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29...v29.0.9)
## [v29](https://github.com/tj-actions/changed-files/tree/v29) (2022-09-20) ## [v29](https://github.com/tj-actions/changed-files/tree/v29) (2022-09-20)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.8...v29) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.9...v29)
## [v29.0.9](https://github.com/tj-actions/changed-files/tree/v29.0.9) (2022-09-20)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v29.0.8...v29.0.9)
**Implemented enhancements:** **Implemented enhancements:**

View File

@@ -52,9 +52,13 @@ Retrieve all changed files and directories relative to the target branch or the
name: CI name: CI
on: on:
# Compare the preceeding commit of main -> to the current commit of the main branch.
# (Note: To compare changes between the last pushed commit to the remote main branch set `since_last_remote_commit: true`)
push: push:
branches: branches:
- main - main
# Compare the last commit of main -> to the current commit of a PR branch.
# (Note: To compare changes between the last pushed commit to the remote PR branch set `since_last_remote_commit: true`)
pull_request: pull_request:
branches: branches:
- main - main

View File

@@ -179,7 +179,7 @@ runs:
INPUT_FETCH_DEPTH: ${{ inputs.fetch_depth }} INPUT_FETCH_DEPTH: ${{ inputs.fetch_depth }}
INPUT_SINCE_LAST_REMOTE_COMMIT: ${{ inputs.since_last_remote_commit }} INPUT_SINCE_LAST_REMOTE_COMMIT: ${{ inputs.since_last_remote_commit }}
- name: Glob match - name: Glob match
uses: tj-actions/glob@v15 uses: tj-actions/glob@v16
id: glob id: glob
with: with:
files: ${{ inputs.files }} files: ${{ inputs.files }}

View File

@@ -45,8 +45,6 @@ fi
if [[ -z $GITHUB_BASE_REF ]]; then if [[ -z $GITHUB_BASE_REF ]]; then
echo "Running on a push event..." echo "Running on a push event..."
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//} && exit_status=$? || exit_status=$?
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
echo "::debug::Getting HEAD SHA..." echo "::debug::Getting HEAD SHA..."
if [[ -n "$INPUT_UNTIL" ]]; then if [[ -n "$INPUT_UNTIL" ]]; then
@@ -67,6 +65,9 @@ if [[ -z $GITHUB_BASE_REF ]]; then
fi fi
fi fi
TARGET_BRANCH=$(git name-rev --name-only "$CURRENT_SHA" 2>&1) && exit_status=$? || exit_status=$?
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA" echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$? git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
@@ -127,8 +128,6 @@ if [[ -z $GITHUB_BASE_REF ]]; then
# shellcheck disable=SC2086 # shellcheck disable=SC2086
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH"
PREVIOUS_SHA=$INPUT_BASE_SHA PREVIOUS_SHA=$INPUT_BASE_SHA
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
CURRENT_BRANCH=$TARGET_BRANCH
fi fi
echo "::debug::Target branch $TARGET_BRANCH..." echo "::debug::Target branch $TARGET_BRANCH..."
@@ -199,10 +198,10 @@ else
if [[ -z $INPUT_BASE_SHA ]]; then if [[ -z $INPUT_BASE_SHA ]]; then
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
PREVIOUS_SHA=""
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then
PREVIOUS_SHA=$(git rev-list -n 1 "$TARGET_BRANCH" 2>&1) && exit_status=$? || exit_status=$?
fi fi
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then