Compare commits

...

34 Commits

Author SHA1 Message Date
Tonye Jack
cbfb0fda5a Merge pull request #740 from tj-actions/feat/pull-initial-history-for-limited-commits
feat: pull initial history when using the default fetch-depth
2022-11-02 08:52:34 -06:00
Tonye Jack
edd790e0a8 Merge pull request #741 from tj-actions/chore/update-test-increase-max-parallel 2022-11-02 08:41:05 -06:00
Tonye Jack
f1bc8b0892 Update diff-sha.sh 2022-11-02 08:29:27 -06:00
Tonye Jack
bc3236f035 chore: update test increase max-parallel 2022-11-02 08:28:18 -06:00
Tonye Jack
e92598caeb feat: pull initial history 2022-11-02 08:09:18 -06:00
Tonye Jack
c295a8af70 Merge pull request #739 from tj-actions/chore/fixed-typo 2022-11-02 07:37:13 -06:00
Tonye Jack
ae1ce4eb54 Merge branch 'main' into chore/fixed-typo 2022-11-01 15:34:02 -06:00
Tonye Jack
23c0e1a9b3 chore: fixed typo. 2022-11-01 15:33:17 -06:00
Tonye Jack
b65bd345ef chore: update test (#738) 2022-11-01 16:55:16 +00:00
Tonye Jack
c2547e29dd Merge pull request #734 from tj-actions/upgrade-to-v34.0.2
Upgraded to v34.0.2
2022-10-31 04:48:30 -06:00
jackton1
cebc3a1072 Upgraded from v34.0.1 -> v34.0.2 2022-10-31 05:18:06 +00:00
Tonye Jack
932dad3197 Merge pull request #733 from tj-actions/chore/update-docs
chore: update docs
2022-10-30 22:43:09 -06:00
Tonye Jack
c0fcba572d Merge branch 'main' into chore/update-docs 2022-10-30 22:17:01 -06:00
Tonye Jack
5dee4bc718 Merge pull request #732 from tj-actions/chore/update-readme
Updated README.md
2022-10-30 22:16:09 -06:00
Tonye Jack
66521ab1de chore: update docs 2022-10-30 22:15:32 -06:00
jackton1
7ce52e88c0 Updated README.md 2022-10-31 04:13:04 +00:00
Tonye Jack
795015c1e8 Merge pull request #730 from tj-actions/chore/update-docs-1
chore: update docs
2022-10-30 22:12:35 -06:00
Tonye Jack
65b4f04d50 Merge branch 'main' into chore/update-docs-1 2022-10-30 22:01:56 -06:00
Tonye Jack
f94d252cea Merge pull request #731 from tj-actions/chore/fix-detecting-changes
chore: fix detecting changes with the first PR commit
2022-10-30 22:00:12 -06:00
Tonye Jack
3c4becd315 chore: fix detecting changes with the first PR commit 2022-10-30 21:52:09 -06:00
Tonye Jack
a5be4ddc74 chore: update docs 2022-10-30 21:15:49 -06:00
Tonye Jack
e793a5d902 Merge pull request #729 from tj-actions/chore/update-debug-message 2022-10-30 21:09:37 -06:00
Tonye Jack
1e6b143073 Fixed bug retrieving the first commit of a pull request 2022-10-30 21:08:40 -06:00
Tonye Jack
983dfd764c chore: update debug message 2022-10-30 21:03:21 -06:00
Tonye Jack
bcba9b1fee Merge pull request #728 from tj-actions/fix/bug-detecting-initial-commits 2022-10-30 20:59:39 -06:00
Tonye Jack
39518769ff Fixed test 2022-10-30 20:39:13 -06:00
Tonye Jack
3e2fd5f6b3 Merge branch 'main' into fix/bug-detecting-initial-commits 2022-10-30 20:29:30 -06:00
Tonye Jack
bb9443782b Merge pull request #727 from tj-actions/upgrade-to-v34.0.1 2022-10-30 20:29:06 -06:00
Tonye Jack
a5eb308eb7 fix: bug detecting initial commits 2022-10-30 20:28:12 -06:00
jackton1
6e32c65ce4 Upgraded from v34.0.0 -> v34.0.1 2022-10-31 02:16:23 +00:00
Tonye Jack
d24b4c4320 Merge pull request #726 from tj-actions/chore/update-readme 2022-10-30 19:26:08 -06:00
jackton1
68d7ab12b2 Updated README.md 2022-10-31 01:21:40 +00:00
Tonye Jack
1a90f7b69c Update README.md 2022-10-30 19:21:13 -06:00
Tonye Jack
c2c004776f Update README.md 2022-10-30 19:17:22 -06:00
6 changed files with 88 additions and 38 deletions

View File

@@ -9,7 +9,7 @@ jobs:
runs-on: ${{ matrix.platform }} runs-on: ${{ matrix.platform }}
strategy: strategy:
fail-fast: false fail-fast: false
max-parallel: 4 max-parallel: 7
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]

View File

@@ -215,8 +215,6 @@ jobs:
steps: steps:
- name: Checkout to branch - name: Checkout to branch
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Run changed-files with a single commit history - name: Run changed-files with a single commit history
id: changed-files id: changed-files

View File

@@ -29,7 +29,7 @@ jobs:
- name: README.md changed - name: README.md changed
if: steps.verify_changed_files.outputs.files_changed == 'true' if: steps.verify_changed_files.outputs.files_changed == 'true'
run: | run: |
echo "README.md has uncommited changes" echo "README.md has uncommitted changes"
exit 1 exit 1
- name: Create Pull Request - name: Create Pull Request

View File

@@ -1,12 +1,58 @@
# Changelog # Changelog
## [v34.0.2](https://github.com/tj-actions/changed-files/tree/v34.0.2) (2022-10-31)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34...v34.0.2)
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-10-31)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.0.1...v34)
**Fixed bugs:**
- \[BUG\] Action fails on initial commit [\#715](https://github.com/tj-actions/changed-files/issues/715)
**Merged pull requests:**
- chore: update docs [\#733](https://github.com/tj-actions/changed-files/pull/733) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#732](https://github.com/tj-actions/changed-files/pull/732) ([jackton1](https://github.com/jackton1))
- chore: fix detecting changes with the first PR commit [\#731](https://github.com/tj-actions/changed-files/pull/731) ([jackton1](https://github.com/jackton1))
- chore: update docs [\#730](https://github.com/tj-actions/changed-files/pull/730) ([jackton1](https://github.com/jackton1))
- chore: update debug message [\#729](https://github.com/tj-actions/changed-files/pull/729) ([jackton1](https://github.com/jackton1))
- fix: bug detecting initial commits [\#728](https://github.com/tj-actions/changed-files/pull/728) ([jackton1](https://github.com/jackton1))
- Upgraded to v34.0.1 [\#727](https://github.com/tj-actions/changed-files/pull/727) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#726](https://github.com/tj-actions/changed-files/pull/726) ([jackton1](https://github.com/jackton1))
## [v34.0.1](https://github.com/tj-actions/changed-files/tree/v34.0.1) (2022-10-31)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v34.0.0...v34.0.1)
**Fixed bugs:**
- \[BUG\] Auto-Merge not working properly on Change-Detection for PRs [\#713](https://github.com/tj-actions/changed-files/issues/713)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Updated README.md [\#725](https://github.com/tj-actions/changed-files/pull/725) ([jackton1](https://github.com/jackton1))
- chore: increase the default max\_fetch\_depth [\#724](https://github.com/tj-actions/changed-files/pull/724) ([jackton1](https://github.com/jackton1))
- fix: bug detecting changes in initial commit. [\#723](https://github.com/tj-actions/changed-files/pull/723) ([jackton1](https://github.com/jackton1))
- fix: bug with finding merge-base [\#722](https://github.com/tj-actions/changed-files/pull/722) ([jackton1](https://github.com/jackton1))
- chore\(deps\): update tj-actions/auto-doc action to v1.4.3 [\#721](https://github.com/tj-actions/changed-files/pull/721) ([renovate[bot]](https://github.com/apps/renovate))
- Updated README.md [\#720](https://github.com/tj-actions/changed-files/pull/720) ([jackton1](https://github.com/jackton1))
- Updated README.md [\#719](https://github.com/tj-actions/changed-files/pull/719) ([jackton1](https://github.com/jackton1))
- chore\(deps\): update tj-actions/auto-doc action to v1.4.2 [\#718](https://github.com/tj-actions/changed-files/pull/718) ([renovate[bot]](https://github.com/apps/renovate))
- Updated README.md [\#717](https://github.com/tj-actions/changed-files/pull/717) ([jackton1](https://github.com/jackton1))
- chore: update docs [\#716](https://github.com/tj-actions/changed-files/pull/716) ([jackton1](https://github.com/jackton1))
- chore: remove comment [\#712](https://github.com/tj-actions/changed-files/pull/712) ([jackton1](https://github.com/jackton1))
- Upgraded to v34.0.0 [\#711](https://github.com/tj-actions/changed-files/pull/711) ([jackton1](https://github.com/jackton1))
## [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/v34...v34.0.0) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34.0.0)
## [v34](https://github.com/tj-actions/changed-files/tree/v34) (2022-10-25)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v33.0.0...v34)
**Fixed bugs:** **Fixed bugs:**
@@ -30,7 +76,6 @@
**Closed issues:** **Closed issues:**
- Ability to do a three dots diff [\#702](https://github.com/tj-actions/changed-files/issues/702) - Ability to do a three dots diff [\#702](https://github.com/tj-actions/changed-files/issues/702)
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:** **Merged pull requests:**
@@ -107,7 +152,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:**
@@ -118,13 +163,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:**
@@ -1130,7 +1175,7 @@
## [v12](https://github.com/tj-actions/changed-files/tree/v12) (2021-12-14) ## [v12](https://github.com/tj-actions/changed-files/tree/v12) (2021-12-14)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v12) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v11...v12)
**Implemented enhancements:** **Implemented enhancements:**
@@ -1148,13 +1193,13 @@
- \[PR 1\]: Renamed all\_modified\_files to all\_changed\_files [\#283](https://github.com/tj-actions/changed-files/pull/283) ([jackton1](https://github.com/jackton1)) - \[PR 1\]: Renamed all\_modified\_files to all\_changed\_files [\#283](https://github.com/tj-actions/changed-files/pull/283) ([jackton1](https://github.com/jackton1))
- Upgraded to v11.9 [\#280](https://github.com/tj-actions/changed-files/pull/280) ([jackton1](https://github.com/jackton1)) - Upgraded to v11.9 [\#280](https://github.com/tj-actions/changed-files/pull/280) ([jackton1](https://github.com/jackton1))
## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11...v11.9)
## [v11](https://github.com/tj-actions/changed-files/tree/v11) (2021-12-04) ## [v11](https://github.com/tj-actions/changed-files/tree/v11) (2021-12-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.9...v11)
## [v11.9](https://github.com/tj-actions/changed-files/tree/v11.9) (2021-12-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...v11.9)
**Implemented enhancements:** **Implemented enhancements:**
@@ -1243,7 +1288,7 @@
## [v1.2.1](https://github.com/tj-actions/changed-files/tree/v1.2.1) (2021-11-08) ## [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/v11.5...v1.2.1) [Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.0...v1.2.1)
**Implemented enhancements:** **Implemented enhancements:**
@@ -1257,13 +1302,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)) - 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)) - Upgraded to v11.5 [\#241](https://github.com/tj-actions/changed-files/pull/241) ([jackton1](https://github.com/jackton1))
## [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/v1.2.0...v11.5)
## [v1.2.0](https://github.com/tj-actions/changed-files/tree/v1.2.0) (2021-10-30) ## [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) [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)
**Merged pull requests:** **Merged pull requests:**

View File

@@ -1,5 +1,7 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/4a625e9b62794b5b98e169c15c0e673c)](https://www.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/changed-files\&utm_campaign=Badge_Grade) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/4a625e9b62794b5b98e169c15c0e673c)](https://www.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/changed-files\&utm_campaign=Badge_Grade)
[![CI](https://github.com/tj-actions/changed-files/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [![Update release version.](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml) [![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fchanged-files%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code) [![CI](https://github.com/tj-actions/changed-files/actions/workflows/test.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
[![Update release version.](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml/badge.svg)](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
[![Public workflows that use this action.](https://img.shields.io/endpoint?url=https%3A%2F%2Fused-by.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3Dtj-actions%2Fchanged-files%26badge%3Dtrue)](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
[![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) [![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?logo=ubuntu\&logoColor=white)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
[![Mac OS](https://img.shields.io/badge/mac%20os-000000?logo=macos\&logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on) [![Mac OS](https://img.shields.io/badge/mac%20os-000000?logo=macos\&logoColor=F0F0F0)](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
@@ -589,7 +591,10 @@ This package was created with [Cookiecutter](https://github.com/cookiecutter/coo
* [tj-actions/glob](https://github.com/tj-actions/glob) * [tj-actions/glob](https://github.com/tj-actions/glob)
* [tj-actions/demo](https://github.com/tj-actions/demo) * [tj-actions/demo](https://github.com/tj-actions/demo)
* [tj-actions/demo2](https://github.com/tj-actions/demo2)
* [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger) * [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger)
* [tj-actions/auto-doc](https://github.com/tj-actions/auto-doc)
* \[tj-actions/verify-changed-files]\(https://github.com/tj-actions/verify-changed-files
## Report Bugs ## Report Bugs

View File

@@ -18,12 +18,12 @@ if [[ -n $INPUT_PATH ]]; then
cd "$REPO_DIR" cd "$REPO_DIR"
fi fi
echo "Verifying git version..."
function __version() { function __version() {
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
} }
echo "Verifying git version..."
GIT_VERSION=$(git --version | awk '{print $3}') && exit_status=$? || exit_status=$? GIT_VERSION=$(git --version | awk '{print $3}') && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then if [[ $exit_status -ne 0 ]]; then
@@ -32,7 +32,7 @@ if [[ $exit_status -ne 0 ]]; then
fi fi
if [[ $(__version "$GIT_VERSION") -lt $(__version "2.18.0") ]]; then if [[ $(__version "$GIT_VERSION") -lt $(__version "2.18.0") ]]; then
echo "::error::Invalid git version. Please upgrade git ($GIT_VERSION) to >= (2.18.0)" echo "::error::Invalid git version. Please upgrade ($GIT_VERSION) to >= (2.18.0)"
exit 1 exit 1
else else
echo "Valid git version found: ($GIT_VERSION)" echo "Valid git version found: ($GIT_VERSION)"
@@ -115,12 +115,12 @@ if [[ -z $GITHUB_BASE_REF ]]; then
fi fi
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1" 2>/dev/null || true) if ! git rev-parse "$PREVIOUS_SHA^1" &>/dev/null; then
if [[ -z "$PREVIOUS_SHA" ]]; then
INITIAL_COMMIT="true" INITIAL_COMMIT="true"
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA") PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA")
echo "::warning::Initial commit detected no previous commit found." echo "::warning::Initial commit detected no previous commit found."
else
PREVIOUS_SHA=$(git rev-parse "$PREVIOUS_SHA^1")
fi fi
else else
if [[ -z "$PREVIOUS_SHA" ]]; then if [[ -z "$PREVIOUS_SHA" ]]; then
@@ -155,9 +155,11 @@ else
CURRENT_BRANCH=$GITHUB_HEAD_REF CURRENT_BRANCH=$GITHUB_HEAD_REF
if [[ -z $INPUT_BASE_SHA ]]; then if [[ -z $INPUT_BASE_SHA ]]; then
git fetch --no-tags -u --progress --deepen=30 origin "$TARGET_BRANCH":"$TARGET_BRANCH"
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$? PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
echo "::debug::Previous SHA: $PREVIOUS_SHA" echo "::debug::Previous SHA: $PREVIOUS_SHA"
else else
git fetch --no-tags -u --progress --deepen=30 origin "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$? PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
fi fi