Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prde-8882): Validator only diffs head with previous commit #35

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -459,12 +459,7 @@ module.exports = (robot, { getRouter }, Settings = require('./lib/settings')) =>
robot.log.debug(`Updating check run ${JSON.stringify(params)}`)
await context.octokit.checks.update(params)

// guarding against null value from upstream libary that is
// causing a 404 and the check to stall
// from issue: https://github.com/github/safe-settings/issues/185#issuecomment-1075240374
if (check_suite.before === '0000000000000000000000000000000000000000') {
check_suite.before = check_suite.pull_requests[0].base.sha
}
check_suite.before = check_suite.pull_requests[0].base.sha
params = Object.assign(context.repo(), { basehead: `${check_suite.before}...${check_suite.after}` })
const changes = await context.octokit.repos.compareCommitsWithBasehead(params)
const files = changes.data.files.map(f => { return f.filename })
Expand Down
Loading