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 and Ana06 committed Jun 4, 2021
1 parent 45d873a commit f51efe5
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 @@ -76,14 +76,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."
)
}

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 f51efe5

Please sign in to comment.