async prAutoMerge({ pullRequestId, mergeMode, mergeMessage, base }) {
    const octo = octokit(this.token, this.repo);
    const graphql = withCustomRequest(octo.request);
    const { owner, repo } = this.ownerRepo();
    const [commitHeadline, commitBody] = mergeMessage
      ? mergeMessage.split(/\n\n(.*)/s)
      : [];
    const {
      data: { node_id: nodeId }
    } = await octo.pulls.get({ owner, repo, pull_number: pullRequestId });
    try {
      await graphql(
        `
          mutation autoMerge(
            $pullRequestId: ID!
            $mergeMethod: PullRequestMergeMethod
            $commitHeadline: String
            $commitBody: String
          ) {
            enablePullRequestAutoMerge(
              input: {
                pullRequestId: $pullRequestId
                mergeMethod: $mergeMethod
                commitHeadline: $commitHeadline
                commitBody: $commitBody
              }
            ) {
              clientMutationId
            }
          }
        `,
        {
          pullRequestId: nodeId,
          mergeMethod: mergeMode.toUpperCase(),
          commitHeadline,
          commitBody
        }
      );
    } catch (err) {
      const tolerate = [
        "Can't enable auto-merge for this pull request",
        'Pull request Protected branch rules not configured for this branch',
        'Pull request is in clean status'
      ];

      if (!tolerate.some((message) => err.message.includes(message))) throw err;

      const settingsUrl = `https://github.com/${owner}/${repo}/settings`;

      try {
        if (await this.isProtected({ branch: base })) {
          logger.warn(
            `Failed to enable auto-merge: Enable the feature in your repository settings: ${settingsUrl}#merge_types_auto_merge. Trying to merge immediately...`
          );
        } else {
          logger.warn(
            `Failed to enable auto-merge: Set up branch protection and add "required status checks" for branch '${base}': ${settingsUrl}/branches. Trying to merge immediately...`
          );
        }
      } catch (err) {
        if (!err.message.includes('Resource not accessible by integration'))
          throw err;
        logger.warn(
          `Failed to enable auto-merge. Trying to merge immediately...`
        );
      }

      await octo.pulls.merge({
        owner,
        repo,
        pull_number: pullRequestId,
        merge_method: mergeMode,
        commit_title: commitHeadline,
        commit_message: commitBody
      });
    }
  }
@param {{ pullRequestId: number, base: string }} param0
@returns {Promise<void>}