Skip to content

Commit

Permalink
Remove response.data.status check
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sargunv authored Mar 15, 2021
1 parent b17fbb0 commit 54f3703
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,6 @@ async function run(): Promise<void> {
)
}

// 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[],
Expand Down

0 comments on commit 54f3703

Please sign in to comment.