From a2f6df8c195e713211f9f6258baafc445149355b Mon Sep 17 00:00:00 2001 From: Ana Maria Martinez Gomez Date: Fri, 4 Jun 2021 13:44:27 +0200 Subject: [PATCH] Prepare release of v1.2 I have cherry-picked the removal of the ahead check: https://github.com/jitterbit/get-changed-files/pull/25 This seems to be a change Jitterbit's community agrees on: https://github.com/jitterbit/get-changed-files/issues/17 Build this change and prepare v1.2 release. --- README.md | 10 +++++----- dist/index.js | 5 ----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 767bf1b9..f0433e2b 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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'. @@ -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: | @@ -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: | @@ -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: | diff --git a/dist/index.js b/dist/index.js index e6a38bcf..3790d505 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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));