Compare commits

...

21 Commits

Author SHA1 Message Date
Tonye Jack
467d26c8b7 Updated git fetch to pull the last remote commit (#254)
* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh

* Update entrypoint.sh
2021-11-19 16:27:56 -05:00
Tonye Jack
bb40edd264 Update README.md 2021-11-18 19:09:51 -05:00
Tonye Jack
c6de787438 Updated .github/workflows/auto-merge.yml 2021-11-16 16:27:36 -05:00
Renovate Bot
45f1e8fb92 Update reviewdog/action-shellcheck action to v1.12 2021-11-16 11:01:29 -05:00
Renovate Bot
ff85b03c27 Update reviewdog/action-shellcheck action to v1.11 2021-11-13 05:10:59 -05:00
Tonye Jack
bc42b5f993 Upgraded from v1.2.1 -> v11.6 (#249)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-11-08 09:35:03 -05:00
Tonye Jack
aae164d51b Upgraded from v1.2.0 -> v1.2.1 (#248)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-11-08 08:35:22 -05:00
Tonye Jack
d9eb683b30 Updated formatting of all modified debug message (#247)
* Updated formatting of all modified debug message

* Update entrypoint.sh

* Update changed-files-list.txt

* Update changed-files-list.txt
2021-11-08 08:17:51 -05:00
Renovate Bot
3f78450f6c Update reviewdog/action-shellcheck action to v1.10 2021-11-07 10:37:02 -05:00
Tonye Jack
b84b6ca11b Update README.md 2021-11-04 01:55:44 -04:00
Renovate Bot
fa48a435b3 Update peter-evans/create-pull-request action to v3.11.0 2021-11-03 23:05:00 -04:00
Renovate Bot
2a91a6204f Update actions/checkout action to v2.4.0 2021-11-02 15:47:19 -04:00
Tonye Jack
a6d5b37cba Removed unused check 2021-11-02 07:43:24 -04:00
Tonye Jack
3ebf0a6369 Update README.md 2021-10-30 20:13:18 -04:00
Tonye Jack
ddc5ed8372 Update README.md 2021-10-30 16:23:17 -04:00
Tonye Jack
8bf07a8b5d Upgraded from v11.4 -> v11.5 (#241)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-10-30 16:19:47 -04:00
Tonye Jack
09a879748c Update action.yml 2021-10-30 16:15:42 -04:00
Tonye Jack
71afc9f3b8 Update README.md 2021-10-30 16:06:21 -04:00
Tonye Jack
bb5d1a8f64 Upgraded from v11.3 -> v11.4 (#239)
Co-authored-by: jackton1 <jackton1@users.noreply.github.com>
2021-10-30 16:05:56 -04:00
Tonye Jack
23b35e63df Update README.md 2021-10-30 16:05:24 -04:00
Tonye Jack
12ed49be65 Update README.md 2021-10-30 16:04:52 -04:00
10 changed files with 90 additions and 27 deletions

View File

@@ -2,7 +2,6 @@ name: automerge
on:
check_suite:
types:
- rerequested
- completed
jobs:
@@ -19,9 +18,9 @@ jobs:
- name: automerge
uses: pascalgn/automerge-action@v0.14.3
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN || github.token }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
MERGE_METHOD: "rebase"
UPDATE_METHOD: "rebase"
MERGE_RETRIES: "6"
MERGE_RETRY_SLEEP: "100000"
MERGE_LABELS: ""
MERGE_LABELS: ""

View File

@@ -8,7 +8,7 @@ jobs:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
with:
token: ${{ secrets.PAT_TOKEN }}
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo

View File

@@ -8,7 +8,7 @@ jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
with:
fetch-depth: 0
- name: Sync release version.
@@ -23,7 +23,7 @@ jobs:
with:
output: 'HISTORY.md'
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3.10.1
uses: peter-evans/create-pull-request@v3.11.0
with:
base: "main"
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"

View File

@@ -18,7 +18,7 @@ jobs:
- name: Checkout to branch
uses: actions/checkout@v2
- name: shellcheck
uses: reviewdog/action-shellcheck@v1.9
uses: reviewdog/action-shellcheck@v1.12
test-multiple-repositories:
name: Test with multiple repositories

View File

@@ -9,7 +9,7 @@ jobs:
sync-assets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: actions/checkout@v2.4.0
with:
fetch-depth: 0

View File

@@ -1,5 +1,61 @@
# Changelog
## [v11.6](https://github.com/tj-actions/changed-files/tree/v11.6) (2021-11-08)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v1.2.1...v11.6)
**Merged pull requests:**
- Upgraded to v1.2.1 [\#248](https://github.com/tj-actions/changed-files/pull/248) ([jackton1](https://github.com/jackton1))
## [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)
**Implemented enhancements:**
- \[Feature\] Improve documentation [\#244](https://github.com/tj-actions/changed-files/issues/244)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Updated formatting of all modified debug message [\#247](https://github.com/tj-actions/changed-files/pull/247) ([jackton1](https://github.com/jackton1))
- Update reviewdog/action-shellcheck action to v1.10 [\#246](https://github.com/tj-actions/changed-files/pull/246) ([renovate[bot]](https://github.com/apps/renovate))
- Update peter-evans/create-pull-request action to v3.11.0 [\#245](https://github.com/tj-actions/changed-files/pull/245) ([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))
## [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)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.4...v1.2.0)
**Merged pull requests:**
- Upgraded to v11.4 [\#239](https://github.com/tj-actions/changed-files/pull/239) ([jackton1](https://github.com/jackton1))
## [v11.4](https://github.com/tj-actions/changed-files/tree/v11.4) (2021-10-30)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.3...v11.4)
**Implemented enhancements:**
- \[Feature\] Get changed files in all commits in push [\#234](https://github.com/tj-actions/changed-files/issues/234)
**Merged pull requests:**
- Updated README.md [\#238](https://github.com/tj-actions/changed-files/pull/238) ([jackton1](https://github.com/jackton1))
- Revert "Update base\_sha to use the last commit on the current branch for push event" [\#237](https://github.com/tj-actions/changed-files/pull/237) ([jackton1](https://github.com/jackton1))
- Support retrieving changed files between the last remote commit and the current HEAD for push events [\#236](https://github.com/tj-actions/changed-files/pull/236) ([jackton1](https://github.com/jackton1))
- Update base\_sha to use the last commit on the current branch for push event [\#235](https://github.com/tj-actions/changed-files/pull/235) ([jackton1](https://github.com/jackton1))
- Upgraded to v11.3 [\#233](https://github.com/tj-actions/changed-files/pull/233) ([jackton1](https://github.com/jackton1))
## [v11.3](https://github.com/tj-actions/changed-files/tree/v11.3) (2021-10-27)
[Full Changelog](https://github.com/tj-actions/changed-files/compare/v11.2...v11.3)
@@ -51,10 +107,6 @@
- \[BUG\] Spaces in file names are not handled correctly [\#216](https://github.com/tj-actions/changed-files/issues/216)
- \[BUG\] Usage of quotes around array items [\#208](https://github.com/tj-actions/changed-files/issues/208)
**Closed issues:**
- Dependency Dashboard [\#27](https://github.com/tj-actions/changed-files/issues/27)
**Merged pull requests:**
- Updated README.md [\#221](https://github.com/tj-actions/changed-files/pull/221) ([jackton1](https://github.com/jackton1))

View File

@@ -26,6 +26,7 @@ Retrieve all changed files relative to the default branch (`pull_request*` based
* List all files that have changed.
* Between the current pull request branch and the default branch.
* Between the last commit and the current pushed change.
* Between the last remote branch commit and the current HEAD.
* Restrict change detection to a subset of files.
* Report on files that have at least one change.
* [Regex pattern](https://www.gnu.org/software/grep/manual/grep.html#Regular-Expressions) matching on a subset of files.
@@ -59,7 +60,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
- name: List all modified files
run: |
@@ -111,7 +112,7 @@ jobs:
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
| files\_from\_source\_file | `string` | `false` | | Source file <br> used to populate <br> the files input |
| path | `string` | `false` | | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha` for push event.<br> (Defaults to the previous commit). |
| since\_last\_remote\_commit | `string` | `false` | `false` | Use the last commit on the remote <br> branch as the `base_sha`.<br> (Defaults to the previous commit). <br /> NOTE: This requires <br /> `fetch-depth: 0`|
## Example
@@ -122,11 +123,11 @@ jobs:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
- name: Get changed files using a comma separator
id: changed-files-comma
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
with:
separator: ","
@@ -148,7 +149,7 @@ jobs:
- name: Get specific changed files
id: changed-files-specific
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
with:
files: |
my-file.txt
@@ -186,14 +187,14 @@ jobs:
- 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@v11.3
uses: tj-actions/changed-files@v11.5
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@v11.3
uses: tj-actions/changed-files@v11.5
with:
files_from_source_file: |
test/changed-files-list.txt
@@ -202,13 +203,13 @@ jobs:
- name: Use a different commit SHA
id: changed-files-custom-sha
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
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@v11.3
uses: tj-actions/changed-files@v11.5
with:
base_sha: "2096ed0"
@@ -220,7 +221,7 @@ jobs:
- name: Run changed-files with defaults on the dir1
id: changed-files-for-dir1
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
with:
path: dir1
@@ -229,6 +230,13 @@ jobs:
for file in ${{ steps.changed-files-for-dir1.outputs.added_files }}; do
echo "$file was added"
done
- name: Run changed-files using the last commit on the remote branch
id: changed-files-since-last-remote-commit
uses: tj-actions/changed-files@v11.5
with:
since_last_remote_commit: 'true'
```
### Running [pre-commit](https://pre-commit.com/) on all modified files
@@ -242,7 +250,7 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v11.3
uses: tj-actions/changed-files@v11.5
- name: Pre-commit
uses: pre-commit/action@v2.0.0

View File

@@ -97,7 +97,7 @@ runs:
- run: |
if [[ -n "${{ inputs.base_sha }}" ]]; then
echo "::set-output name=base_sha::${{ inputs.base_sha }}"
elif [[ "${{ github.event_name }}" == "push" && -z "${{ inputs.base_sha }}" && "${{ inputs.since_last_remote_commit }}" == "true" ]]; then
elif [[ "${{ inputs.since_last_remote_commit }}" == "true" ]]; then
echo "::set-output name=base_sha::${{ github.event.before }}"
fi
id: base-sha

View File

@@ -62,15 +62,18 @@ if [[ -z $GITHUB_BASE_REF ]]; then
else
TARGET_BRANCH=$GITHUB_BASE_REF
CURRENT_BRANCH=$GITHUB_HEAD_REF
git fetch temp_changed_files --no-tags -u "${TARGET_BRANCH}":"${TARGET_BRANCH}"
if [[ -z $INPUT_BASE_SHA ]]; then
git fetch --no-tags -u --progress --depth=1 temp_changed_files "${TARGET_BRANCH}":"${TARGET_BRANCH}"
PREVIOUS_SHA=$(git rev-parse "${TARGET_BRANCH}" 2>&1) && exit_status=$? || exit_status=$?
else
git fetch --no-tags -u --progress --depth=1 temp_changed_files "$INPUT_BASE_SHA"
PREVIOUS_SHA=$INPUT_BASE_SHA
fi
if [[ $exit_status -ne 0 ]]; then
echo "::warning::Unable to determine the base ref sha for ${TARGET_BRANCH}"
echo "::warning::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
git remote remove temp_changed_files
exit 1
fi
@@ -119,9 +122,10 @@ else
fi
fi
echo "Matching modified files: ${UNIQUE_ALL_MODIFIED}"
UNIQUE_ALL_MODIFIED=$(echo "${UNIQUE_ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
if [[ -n "${UNIQUE_ALL_MODIFIED}" ]]; then
echo "Matching modified files: ${UNIQUE_ALL_MODIFIED}"
echo "::set-output name=any_changed::true"
else
echo "::set-output name=any_changed::false"

View File

@@ -1,4 +1,4 @@
.github/workflows/test.yml
action.yml
action.yml
test/changed-files-list.txt
action.yml