/**
 * Determines if a commit is in a pull-request
 * @param {object} context - Probot context object
 * @param {string} sha - Commit sha
 * @returns {number|boolean} - The PR number if it exists or false
 */
async function commitIsInPR (context, sha) {
  const prs = await context.github.pullRequests.getAll(context.repo())

  prs.forEach(async pr => {
    const commits = await context.github.pullRequests.getCommits(context.repo({number: pr.number}))
    if (commits.some(c => c.sha === sha)) {
      return pr.number
    }
  })
  return false
}

module.exports = commitIsInPR

@@ -317,16 +317,88 @@
 .repo())
+%0A  console.log('PRS:', prs)%0A  if (!prs %7C%7C prs.length === 0) return false
 %0A%0A  prs.
@@ -419,16 +419,43 @@
 pr =%3E %7B%0A
+    console.log('PR:', pr)%0A
     cons
@@ -546,16 +546,53 @@
 mber%7D))%0A
+    console.log('COMMITS:', commits)%0A
     if (

Add logs for debugging