Skip to content

Commit

Permalink
Prepare release of v1.2
Browse files Browse the repository at this point in the history
I have cherry-picked the removal of the ahead check:
jitterbit#25

This seems to be a change Jitterbit's community agrees on:
jitterbit#17

Build this change and prepare v1.2 release.
  • Loading branch information
Ana06 committed Jun 4, 2021
1 parent f51efe5 commit a2f6df8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![CI status](https://github.com/Ana06/get-changed-files/workflows/Test/badge.svg)](https://github.com/Ana06/get-changed-files/actions?query=event%3Apush+branch%3Amain)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.txt)

This project is a fork of https://github.com/jitterbit/get-changed-files, which supports `pull_request_target` and allow to filter files using regular expressions.
This project is a fork of https://github.com/jitterbit/get-changed-files, which supports `pull_request_target`, allow to filter files using regular expressions and removes the ahead check.

# Get All Changed Files

Expand All @@ -15,7 +15,7 @@ The `steps` output context exposes the output names `all`, `added`, `modified`,
See [action.yml](action.yml)

```yaml
- uses: Ana06/get-changed-files@v1.1
- uses: Ana06/get-changed-files@v1.2
with:
# Format of the steps output context.
# Can be 'space-delimited', 'csv', or 'json'.
Expand All @@ -38,7 +38,7 @@ Consider using one of the other formats if that's the case.
```yaml
- id: files
uses: Ana06/get-changed-files@v1.1
uses: Ana06/get-changed-files@v1.2
with:
filter: '*.php'
- run: |
Expand All @@ -51,7 +51,7 @@ Consider using one of the other formats if that's the case.
```yaml
- id: files
uses: Ana06/get-changed-files@v1.1
uses: Ana06/get-changed-files@v1.2
with:
format: 'csv'
- run: |
Expand All @@ -65,7 +65,7 @@ Consider using one of the other formats if that's the case.
```yaml
- id: files
uses: Ana06/get-changed-files@v1.1
uses: Ana06/get-changed-files@v1.2
with:
format: 'json'
- run: |
Expand Down
5 changes: 0 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3567,11 +3567,6 @@ function run() {
core.setFailed(`The GitHub API for comparing the base and head commits for this ${github_1.context.eventName} event returned ${response.status}, expected 200. ` +
"Please submit an issue on this action's GitHub repo.");
}
// Ensure that the head commit is ahead of the base commit.
if (response.data.status !== 'ahead') {
core.setFailed(`The head commit for this ${github_1.context.eventName} event is not ahead of the base commit. ` +
"Please submit an issue on this action's GitHub repo.");
}
const regex = new RegExp(`/${filter}\\b`, 'g');
// Get the changed files from the response payload.
const files = response.data.files.filter(file => file.filename.match(regex));
Expand Down

0 comments on commit a2f6df8

Please sign in to comment.