async function handleOpenedPullRequest (robot, context) {
  const config = await getConfig(context, 'github-bot.yml', defaultConfig(robot, '.github/github-bot.yml'))
  const projectBoardConfig = config ? config['project-board'] : null
  const automatedTestsConfig = config ? config['automated-tests'] : null
  if (!projectBoardConfig || !automatedTestsConfig) {
    return
  }

  await context.github.repos.createStatus(context.repo({
    context: 'Mobile e2e tests',
    description: `Tests will run once the PR is moved to the ${automatedTestsConfig['kickoff-column-name']} column`,
    sha: context.payload.pull_request.head.sha,
    state: 'error'
  }))
}
// This method creates a sentinel status in new PRs so that they can't be merged before an e2e test run has successfully completed
This method creates a sentinel status in new PRs so that they can't be merged before an e2e test run has successfully completed
This method creates a sentinel status in new PRs so that they can ' t be merged before an e2e test run has successfully completed
async function handleOpenedPullRequest (robot, context) {
  const config = await getConfig(context, 'github-bot.yml', defaultConfig(robot, '.github/github-bot.yml'))
  const projectBoardConfig = config ? config['project-board'] : null
  const automatedTestsConfig = config ? config['automated-tests'] : null
  if (!projectBoardConfig || !automatedTestsConfig) {
    return
  }
  await context.github.repos.createStatus(context.repo({
    context: 'Mobile e2e tests',
    description: `Tests will run once the PR is moved to the ${automatedTestsConfig['kickoff-column-name']} column`,
    sha: context.payload.pull_request.head.sha,
    state: 'error'
  }))
}
async function handleOpenedPullRequest ( robot , context ) { const config = await getConfig ( context , 'github-bot.yml' , defaultConfig ( robot , '.github/github-bot.yml' ) ) const projectBoardConfig = config ? config [ 'project-board' ] : null const automatedTestsConfig = config ? config [ 'automated-tests' ] : null if ( ! projectBoardConfig || ! automatedTestsConfig ) { return } await context . github . repos . createStatus ( context . repo ( { context : 'Mobile e2e tests' , description : ` ${ automatedTestsConfig [ 'kickoff-column-name' ] } ` , sha : context . payload . pull_request . head . sha , state : 'error' } ) ) }
This method creates a sentinel status in new PRs so that they can't be merged before an e2e test run has successfully completed
This method creates a sentinel status in new PRs so that they can ' t be merged before an e2e test run has successfully completed