From 54f37035de4da94142f10f4ad576c04869f4150e Mon Sep 17 00:00:00 2001 From: Sargun Vohra Date: Mon, 15 Mar 2021 14:34:06 -0700 Subject: [PATCH] Remove response.data.status check It's perfectly valid for a head to be "behind" a base when comparing commits for pull request events. For example, PRing a feature branch of `main` while other commits have landed on `main` after the feature branch was started but before the PR was created, or a PR to merge a "development" branch onto a slower moving "release" branch that has some hotfixes on it. --- src/main.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/main.ts b/src/main.ts index 0f0fdd61..7c41c073 100644 --- a/src/main.ts +++ b/src/main.ts @@ -74,14 +74,6 @@ async function run(): Promise { ) } - // Ensure that the head commit is ahead of the base commit. - if (response.data.status !== 'ahead') { - core.setFailed( - `The head commit for this ${context.eventName} event is not ahead of the base commit. ` + - "Please submit an issue on this action's GitHub repo." - ) - } - // Get the changed files from the response payload. const files = response.data.files const all = [] as string[],