anchor.diff:        prNumber!,
         graphQLClient,
       );
  -
       auto_submit.QueryResult queryResult = auto_submit.QueryResult.fromJson(data);
       if (queryResult.repository == null) {
         throw StateError('Query did not return a repository.');
       }
       final auto_submit.PullRequest pullRequest = queryResult.repository!.pullRequest!;
       final String authorAssociation = pullRequest.authorAssociation!;
  -
       log.info('The author association is ${pullRequest.authorAssociation!}');
       auto_submit.Commit commit = pullRequest.commits!.nodes!.single.commit!;
       List<auto_submit.ContextNode> statuses = <auto_submit.ContextNode>[];
  -    if (commit.status!.contexts!.isNotEmpty) {
  +    // The status list can be empty.
  +    if (commit.status != null && commit.status!.contexts!.isNotEmpty) {
         statuses.addAll(commit.status!.contexts!);
       }
   
  
positive.code:     );
      final String id = pullRequest.id!;
      final String title = pullRequest.title!;
  
      return _AutoMergeQueryResult(
        slug: slug,
        graphQLId: id,
  
negative.code:     final bool isConflicting = pr.mergeable == false;
      // This is used to skip landing until we are sure the PR is mergeable.
      final bool unknownMergeableState = pr.mergeableState == 'UNKNOWN';
      final RepositorySlug slug = pr.base!.repo!.slug();
      final int? prNumber = pr.number;
      final Map<String, dynamic> data = await _queryGraphQL(
  