Compare commits

...

4 Commits
v11.8 ... v11

Author SHA1 Message Date
Tonye Jack
3b638a9708 Upgraded from v11.8 -> v1.3.1 (#279)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-12-04 16:39:14 -05:00
Tonye Jack
188487d180 Fixed regression bug with base_sha for pull_request (#278)
* Fixed regression bug with base_sha for pull_request

Fixes: #276

* Update action.yml

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh
2021-12-04 16:34:44 -05:00
Tonye Jack
922308f3c8 Update entrypoint.sh (#277) 2021-12-04 16:14:27 -05:00
Tonye Jack
f2bbfc138b Upgraded from v1.3.0 -> v11.8 (#275)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-12-04 08:01:23 -05:00
4 changed files with 47 additions and 17 deletions

View File

@@ -1,5 +1,31 @@
# Changelog
## [Unreleased](https://github.com/tj-actions/changed-files/tree/HEAD)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.1...HEAD)
**Implemented enhancements:**
- I cant get `since_last_remote_commit` to work properly on pull\_request event [\#276](https://github.com/tj-actions/changed-files/issues/276)
## [v1.3.1](https://github.com/tj-actions/changed-files/tree/v1.3.1) (2021-12-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.8...v1.3.1)
**Merged pull requests:**
- Fixed regression bug with base\_sha for pull\_request [\#278](https://github.com/tj-actions/changed-files/pull/278) ([jackton1](https://github.com/jackton1))
- Prevent outputting remote not found error message. [\#277](https://github.com/tj-actions/changed-files/pull/277) ([jackton1](https://github.com/jackton1))
- Upgraded to v11.8 [\#275](https://github.com/tj-actions/changed-files/pull/275) ([jackton1](https://github.com/jackton1))
## [v11.8](https://github.com/tj-actions/changed-files/tree/v11.8) (2021-12-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.3.0...v11.8)
**Merged pull requests:**
- Upgraded to v1.3.0 [\#274](https://github.com/tj-actions/changed-files/pull/274) ([jackton1](https://github.com/jackton1))
## [v1.3.0](https://github.com/tj-actions/changed-files/tree/v1.3.0) (2021-12-04)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.7...v1.3.0)

View File

@@ -63,7 +63,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v1.3.0
uses: tj-actions/changed-files@v1.3.1
- name: List all modified files
run: |
@@ -136,11 +136,11 @@ Support this project with a :star:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v1.3.0
uses: tj-actions/changed-files@v1.3.1
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v1.3.0
uses: tj-actions/changed-files@v1.3.1
with:
separator: ","
@@ -162,7 +162,7 @@ Support this project with a :star:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v1.3.0
uses: tj-actions/changed-files@v1.3.1
with:
files: |
my-file.txt
@@ -200,14 +200,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@v1.3.0
uses: tj-actions/changed-files@v1.3.1
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@v1.3.0
uses: tj-actions/changed-files@v1.3.1
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -216,13 +216,13 @@ Support this project with a :star:
- name: Use a different commit SHA
id: changed-files-custom-sha
uses: tj-actions/changed-files@v1.3.0
uses: tj-actions/changed-files@v1.3.1
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@v1.3.0
uses: tj-actions/changed-files@v1.3.1
with:
base_sha: "2096ed0"
@@ -234,7 +234,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@v1.3.0
uses: tj-actions/changed-files@v1.3.1
with:
path: dir1
@@ -246,7 +246,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@v1.3.0
uses: tj-actions/changed-files@v1.3.1
with:
since_last_remote_commit: 'true'
@@ -263,7 +263,7 @@ Support this project with a :star:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v1.3.0
uses: tj-actions/changed-files@v1.3.1
- name: Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -98,10 +98,12 @@ runs:
# "Set base sha..."
if [[ -n "${{ inputs.base_sha }}" ]]; then
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event_name }}" == "pull_request" ]]; then
echo "::set-output name=base_sha::${{ github.event.pull_request.base.sha }}"
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" && "${{ github.event_name }}" == "push" && "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
echo "::set-output name=base_sha::${{ github.event.before }}"
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" ]]; then
if [[ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]]; then
echo "::set-output name=base_sha::${{ github.event.before }}"
else
echo "::set-output name=base_sha::${{ github.sha }}"
fi
fi
id: base-sha
shell: bash

View File

@@ -24,7 +24,7 @@ git ls-remote --exit-code temp_changed_files 1>/dev/null 2>&1 && exit_status=$?
if [[ $exit_status -ne 0 ]]; then
echo "No 'temp_changed_files' remote found"
echo "Creating 'temp_changed_files' remote..."
git remote remove temp_changed_files 1>/dev/null || true
git remote remove temp_changed_files 2>/dev/null || true
git remote add temp_changed_files "https://${INPUT_TOKEN}@${SERVER_URL}/${GITHUB_REPOSITORY}"
else
echo "Found 'temp_changed_files' remote"
@@ -56,6 +56,7 @@ if [[ -z $GITHUB_BASE_REF ]]; then
PREVIOUS_SHA=$(git rev-parse 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=$?
fi
git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
@@ -76,8 +77,9 @@ else
else
git fetch --no-tags -u --progress --depth=1 temp_changed_files "$INPUT_BASE_SHA" && exit_status=$? || exit_status=$?
PREVIOUS_SHA=$INPUT_BASE_SHA
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
fi
git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
if [[ $exit_status -ne 0 ]]; then