query($endCursor: String, $organization: String!, $repository: String!) {
  repository(owner: $organization, name: $repository) {
    branchProtectionRules(first: 100, after: $endCursor) {
      nodes {
        id
        pattern
        allowsDeletions
        allowsForcePushes
        blocksCreations
        dismissesStaleReviews
        isAdminEnforced
        lockAllowsFetchAndMerge
        lockBranch
        requireLastPushApproval
        requiredApprovingReviewCount
        requiresApprovingReviews
        requiresCodeOwnerReviews
        requiresCommitSignatures
        requiresConversationResolution
        requiresLinearHistory
        requiresStatusChecks
        requiresStrictStatusChecks
        restrictsPushes
        restrictsReviewDismissals
        bypassPullRequestAllowances {
          totalCount
        }
        bypassForcePushAllowances {
          totalCount
        }
        pushAllowances {
          totalCount
        }
        reviewDismissalAllowances {
          totalCount
        }
        requiredStatusChecks {
          app {
            slug
          }
          context
        }
        requiresDeployments
        requiredDeploymentEnvironments
      }
      pageInfo {
        hasNextPage
        endCursor
      }
    }
  }
}
