async prAutoMerge({ pullRequestId, mergeMode, mergeMessage }) {
    if (mergeMode === 'rebase')
      throw new Error(`Rebase auto-merge mode not implemented for GitLab`);

    const projectPath = await this.projectPath();

    const endpoint = `/projects/${projectPath}/merge_requests/${pullRequestId}/merge`;
    const body = new URLSearchParams();
    body.set('merge_when_pipeline_succeeds', true);
    body.set('squash', mergeMode === 'squash');
    if (mergeMessage) body.set(`${mergeMode}_commit_message`, mergeMessage);

    try {
      await backOff(() =>
        this.request({
          endpoint,
          method: 'PUT',
          body
        })
      );
    } catch ({ message }) {
      logger.warn(
        `Failed to enable auto-merge: ${message}. Trying to merge immediately...`
      );
      body.set('merge_when_pipeline_succeeds', false);
      this.request({
        endpoint,
        method: 'PUT',
        body
      });
    }
  }
@param {{ pullRequestId: string }} param0
@returns {Promise<void>}