Repository: hub4j/github-api
Pull request #2047 (2025-02-27 18:07:51)

Chore(deps-dev): Bump org.junit.vintage:junit-vintage-engine from 5.10.2 to 5.12.1
Bumps [org.junit.vintage:junit-vintage-engine](https://github.com/junit-team/junit5) from 5.10.2 to 5.12.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/junit-team/junit5/releases">org.junit.vintage:junit-vintage-engine's releases</a>.</em></p>
<blockquote>
<p>JUnit 5.12.0 = Platform 1.12.0 + Jupiter 5.12.0 + Vintage 5.12.0</p>
<p>See <a href="https://junit.org/junit5/docs/5.12.0/release-notes/">Release Notes</a>.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/chris-carneiro"><code>@​chris-carneiro</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3938">junit-team/junit5#3938</a></li>
<li><a href="https://github.com/amaembo"><code>@​amaembo</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4024">junit-team/junit5#4024</a></li>
<li><a href="https://github.com/vdmitrienko"><code>@​vdmitrienko</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3889">junit-team/junit5#3889</a></li>
<li><a href="https://github.com/JojOatXGME"><code>@​JojOatXGME</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4032">junit-team/junit5#4032</a></li>
<li><a href="https://github.com/yhkuo41"><code>@​yhkuo41</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3169">junit-team/junit5#3169</a></li>
<li><a href="https://github.com/AndreasTu"><code>@​AndreasTu</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3431">junit-team/junit5#3431</a></li>
<li><a href="https://github.com/YongGoose"><code>@​YongGoose</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4115">junit-team/junit5#4115</a></li>
<li><a href="https://github.com/JonasJebing"><code>@​JonasJebing</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4045">junit-team/junit5#4045</a></li>
<li><a href="https://github.com/ky0n"><code>@​ky0n</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4152">junit-team/junit5#4152</a></li>
<li><a href="https://github.com/filiphr"><code>@​filiphr</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4148">junit-team/junit5#4148</a></li>
<li><a href="https://github.com/Anmavel"><code>@​Anmavel</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4149">junit-team/junit5#4149</a></li>
<li><a href="https://github.com/awelless"><code>@​awelless</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3259">junit-team/junit5#3259</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0">https://github.com/junit-team/junit5/compare/r5.11.4...r5.12.0</a></p>
<p>JUnit 5.12.0-RC2 = Platform 1.12.0-RC2 + Jupiter 5.12.0-RC2 + Vintage 5.12.0-RC2</p>
<p>See <a href="https://junit.org/junit5/docs/5.12.0-RC2/release-notes/">Release Notes</a>.</p>
<p><strong>Full Changelog</strong>: <a href="https://github.com/junit-team/junit5/compare/r5.12.0-RC1...r5.12.0-RC2">https://github.com/junit-team/junit5/compare/r5.12.0-RC1...r5.12.0-RC2</a></p>
<p>JUnit 5.12.0-RC1 = Platform 1.12.0-RC1 + Jupiter 5.12.0-RC1 + Vintage 5.12.0-RC1</p>
<p>See <a href="https://junit.org/junit5/docs/5.12.0-RC1/release-notes/">Release Notes</a>.</p>
<p><strong>Full Changelog</strong>: <a href="https://github.com/junit-team/junit5/compare/r5.12.0-M1...r5.12.0-RC1">https://github.com/junit-team/junit5/compare/r5.12.0-M1...r5.12.0-RC1</a></p>
<p>JUnit 5.12.0-M1 = Platform 1.12.0-M1 + Jupiter 5.12.0-M1 + Vintage 5.12.0-M1</p>
<p>See <a href="https://junit.org/junit5/docs/5.12.0-M1/release-notes/">Release Notes</a>.</p>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/chris-carneiro"><code>@​chris-carneiro</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3938">junit-team/junit5#3938</a></li>
<li><a href="https://github.com/amaembo"><code>@​amaembo</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4024">junit-team/junit5#4024</a></li>
<li><a href="https://github.com/vdmitrienko"><code>@​vdmitrienko</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3889">junit-team/junit5#3889</a></li>
<li><a href="https://github.com/JojOatXGME"><code>@​JojOatXGME</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4032">junit-team/junit5#4032</a></li>
<li><a href="https://github.com/yhkuo41"><code>@​yhkuo41</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3169">junit-team/junit5#3169</a></li>
<li><a href="https://github.com/AndreasTu"><code>@​AndreasTu</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3431">junit-team/junit5#3431</a></li>
<li><a href="https://github.com/YongGoose"><code>@​YongGoose</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4115">junit-team/junit5#4115</a></li>
<li><a href="https://github.com/JonasJebing"><code>@​JonasJebing</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4045">junit-team/junit5#4045</a></li>
<li><a href="https://github.com/ky0n"><code>@​ky0n</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4152">junit-team/junit5#4152</a></li>
<li><a href="https://github.com/filiphr"><code>@​filiphr</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4148">junit-team/junit5#4148</a></li>
<li><a href="https://github.com/Anmavel"><code>@​Anmavel</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/4149">junit-team/junit5#4149</a></li>
<li><a href="https://github.com/awelless"><code>@​awelless</code></a> made their first contribution in <a href="https://redirect.github.com/junit-team/junit5/pull/3259">junit-team/junit5#3259</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/junit-team/junit5/commit/2750b0402e38fbed2c15ec47e8b422aa812a9e1e"><code>2750b04</code></a> Release 5.12.0</li>
<li><a href="https://github.com/junit-team/junit5/commit/96154903cf63e469932da41b937970205f1dd7e2"><code>9615490</code></a> Update log suppressions for tests</li>
<li><a href="https://github.com/junit-team/junit5/commit/0a8d65b3d902be19ca2b4ed457aa38c2c8a3f450"><code>0a8d65b</code></a> Remove duplicated reference to <code>SimpleArgumentConverter</code></li>
<li><a href="https://github.com/junit-team/junit5/commit/cafbcdbbe2864ea53ff61f1f47dbc459b83646dc"><code>cafbcdb</code></a> Update open-test-reporting to 0.2.0</li>
<li><a href="https://github.com/junit-team/junit5/commit/ed1773c5f52002961f550fcc341b14fc95a66913"><code>ed1773c</code></a> Fix version references to be 1.x in Platform and 5.x in Jupiter</li>
<li><a href="https://github.com/junit-team/junit5/commit/1d2f982ff76b4c91ef15d4b209dc1c753fb861e2"><code>1d2f982</code></a> Update open-test-reporting to 0.2.0-M3</li>
<li><a href="https://github.com/junit-team/junit5/commit/2b6bab5faa7cb920e4682094700197f1fb7812d1"><code>2b6bab5</code></a> Fix indentation</li>
<li><a href="https://github.com/junit-team/junit5/commit/d1929bb81360f15314ec2b04597da42ae5030339"><code>d1929bb</code></a> Merge 5.12.0 release notes</li>
<li><a href="https://github.com/junit-team/junit5/commit/9b7a3c4406c8d9f8feefc7c7fba66efd6dfbf128"><code>9b7a3c4</code></a> Back to snapshots for further development</li>
<li><a href="https://github.com/junit-team/junit5/commit/a410c9287162edc4d896626cf6cb73efa628760a"><code>a410c92</code></a> Release 5.12.0-RC2</li>
<li>Additional commits viewable in <a href="https://github.com/junit-team/junit5/compare/r5.10.2...r5.12.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.junit.vintage:junit-vintage-engine&package-manager=maven&previous-version=5.10.2&new-version=5.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml
index 9fa64e505..f6973dae0 100644
--- a/.github/workflows/maven-build.yml
+++ b/.github/workflows/maven-build.yml
@@ -107,7 +107,7 @@ jobs:
         name: maven-test-target-directory
         path: target
     - name: Codecov Report
-      uses: codecov/codecov-action@v5.3.1
+      uses: codecov/codecov-action@v5.4.0
       with:
         # Codecov token from https://app.codecov.io/gh/hub4j/github-api/settings
         token: ${{ secrets.CODECOV_TOKEN }}
diff --git a/pom.xml b/pom.xml
index b28166f9d..3fdf8faa9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -34,7 +34,7 @@
   <properties>
     <spring.boot.version>3.3.5</spring.boot.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <spotbugs-maven-plugin.version>4.8.6.4</spotbugs-maven-plugin.version>
+    <spotbugs-maven-plugin.version>4.9.1.0</spotbugs-maven-plugin.version>
     <spotbugs.version>4.8.6</spotbugs.version>
     <spotbugs-maven-plugin.failOnError>true</spotbugs-maven-plugin.failOnError>
     <hamcrest.version>3.0</hamcrest.version>
@@ -411,10 +411,44 @@
       <dependency>
         <groupId>com.fasterxml.jackson</groupId>
         <artifactId>jackson-bom</artifactId>
-        <version>2.18.2</version>
+        <version>2.18.3</version>
         <scope>import</scope>
         <type>pom</type>
-      </dependency>   
+      </dependency>
+      <dependency>
+        <groupId>junit</groupId>
+        <artifactId>junit</artifactId>
+        <version>4.13.2</version>
+      </dependency>
+      <dependency>
+        <groupId>org.junit</groupId>
+        <artifactId>junit-bom</artifactId>
+        <version>5.12.1</version>
+        <scope>import</scope>
+        <type>pom</type>
+      </dependency>
+      <dependency>
+        <groupId>org.hamcrest</groupId>
+        <artifactId>hamcrest</artifactId>
+        <version>${hamcrest.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.hamcrest</groupId>
+        <artifactId>hamcrest-core</artifactId>
+        <version>${hamcrest.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.hamcrest</groupId>
+        <artifactId>hamcrest-library</artifactId>
+        <version>${hamcrest.version}</version>
+      </dependency>
+      <dependency>
+          <groupId>org.springframework.boot</groupId>
+          <artifactId>spring-boot-dependencies</artifactId>
+          <version>${spring.boot.version}</version>
+          <type>pom</type>
+          <scope>import</scope>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 
@@ -427,13 +461,12 @@
     <dependency>
       <groupId>com.tngtech.archunit</groupId>
       <artifactId>archunit</artifactId>
-      <version>1.3.0</version>
+      <version>1.4.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.hamcrest</groupId>
       <artifactId>hamcrest</artifactId>
-      <version>${hamcrest.version}</version>
       <scope>test</scope>
     </dependency>
     <!--
@@ -443,45 +476,40 @@
     <dependency>
       <groupId>org.springframework.boot</groupId>
       <artifactId>spring-boot-starter-test</artifactId>
-      <version>${spring.boot.version}</version>
       <scope>test</scope>
     </dependency>
     <!-- This is needed in order to force junit4 and JTH tests to use newer hamcrest version -->
     <dependency>
       <groupId>org.hamcrest</groupId>
       <artifactId>hamcrest-core</artifactId>
-      <version>${hamcrest.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.hamcrest</groupId>
       <artifactId>hamcrest-library</artifactId>
-      <version>${hamcrest.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>com.github.npathai</groupId>
-      <artifactId>hamcrest-optional</artifactId>
-      <version>2.0.0</version>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
       <scope>test</scope>
     </dependency>
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.13.2</version>
+      <groupId>com.github.npathai</groupId>
+      <artifactId>hamcrest-optional</artifactId>
+      <version>2.0.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.awaitility</groupId>
       <artifactId>awaitility</artifactId>
-      <version>4.2.2</version>
+      <version>4.3.0</version>
       <scope>test</scope>
     </dependency>
     <!-- junit vintage engine is used because junit4 and junit5 tests are required -->
     <dependency>
       <groupId>org.junit.vintage</groupId>
       <artifactId>junit-vintage-engine</artifactId>
-      <version>5.10.2</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -562,13 +590,13 @@
     <dependency>
       <groupId>com.google.code.gson</groupId>
       <artifactId>gson</artifactId>
-      <version>2.11.0</version>
+      <version>2.12.1</version>
       <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-simple</artifactId>
-      <version>2.0.16</version>
+      <version>2.0.17</version>
       <scope>test</scope>
     </dependency>
   </dependencies>
@@ -611,7 +639,7 @@
                 </configuration>
               </execution>
               <execution>
-                <id>httpclient-test</id>
+                <id>httpclient-test-tracing</id>
                 <phase>integration-test</phase>
                 <goals>
                   <goal>test</goal>
diff --git a/src/main/java/org/kohsuke/github/GHPullRequest.java b/src/main/java/org/kohsuke/github/GHPullRequest.java
index 128f819d5..ac91ad8c3 100644
--- a/src/main/java/org/kohsuke/github/GHPullRequest.java
+++ b/src/main/java/org/kohsuke/github/GHPullRequest.java
@@ -629,6 +629,66 @@ public class GHPullRequest extends GHIssue implements Refreshable {
         REBASE
     }
 
+    /**
+     * Request to enable auto merge for a pull request.
+     *
+     * @param authorEmail
+     *            The email address to associate with this merge.
+     * @param clientMutationId
+     *            A unique identifier for the client performing the mutation.
+     * @param commitBody
+     *            Commit body to use for the commit when the PR is mergable; if omitted, a default message will be used.
+     *            NOTE: when merging with a merge queue any input value for commit message is ignored.
+     * @param commitHeadline
+     *            Commit headline to use for the commit when the PR is mergable; if omitted, a default message will be
+     *            used. NOTE: when merging with a merge queue any input value for commit headline is ignored.
+     * @param expectedHeadOid
+     *            The expected head OID of the pull request.
+     * @param mergeMethod
+     *            The merge method to use. If omitted, defaults to `MERGE`. NOTE: when merging with a merge queue any
+     *            input value for merge method is ignored.
+     * @throws IOException
+     *             the io exception
+     */
+    public void enablePullRequestAutoMerge(String authorEmail,
+            String clientMutationId,
+            String commitBody,
+            String commitHeadline,
+            String expectedHeadOid,
+            MergeMethod mergeMethod) throws IOException {
+
+        StringBuilder inputBuilder = new StringBuilder();
+        addParameter(inputBuilder, "pullRequestId", this.getNodeId());
+        addOptionalParameter(inputBuilder, "authorEmail", authorEmail);
+        addOptionalParameter(inputBuilder, "clientMutationId", clientMutationId);
+        addOptionalParameter(inputBuilder, "commitBody", commitBody);
+        addOptionalParameter(inputBuilder, "commitHeadline", commitHeadline);
+        addOptionalParameter(inputBuilder, "expectedHeadOid", expectedHeadOid);
+        addOptionalParameter(inputBuilder, "mergeMethod", mergeMethod);
+
+        String graphqlBody = "mutation EnableAutoMerge { enablePullRequestAutoMerge(input: {" + inputBuilder + "}) { "
+                + "pullRequest { id } } }";
+
+        root().createGraphQLRequest(graphqlBody).sendGraphQL();
+
+        refresh();
+    }
+
+    private void addOptionalParameter(StringBuilder inputBuilder, String name, Object value) {
+        if (value != null) {
+            addParameter(inputBuilder, name, value);
+        }
+    }
+
+    private void addParameter(StringBuilder inputBuilder, String name, Object value) {
+        Objects.requireNonNull(value);
+        String formatString = " %s: \"%s\"";
+        if (value instanceof Enum) {
+            formatString = " %s: %s";
+        }
+
+        inputBuilder.append(String.format(formatString, name, value));
+    }
     /**
      * The status of auto merging a {@linkplain GHPullRequest}.
      *
diff --git a/src/main/java/org/kohsuke/github/GHRepository.java b/src/main/java/org/kohsuke/github/GHRepository.java
index 27478c89e..65487caba 100644
--- a/src/main/java/org/kohsuke/github/GHRepository.java
+++ b/src/main/java/org/kohsuke/github/GHRepository.java
@@ -835,7 +835,7 @@ public class GHRepository extends GHObject {
      */
     @SuppressFBWarnings(value = { "EI_EXPOSE_REP" }, justification = "Expected")
     public GHRepository getTemplateRepository() {
-        return (GHRepository) template_repository;
+        return template_repository;
     }
 
     /**
@@ -1503,6 +1503,21 @@ public class GHRepository extends GHObject {
                 .wrapUp(this);
     }
 
+    /**
+     * Retrieves all the pull requests of a particular state.
+     *
+     * @param state
+     *            the state
+     * @return the pull requests
+     * @throws IOException
+     *             the io exception
+     * @deprecated Use {@link #queryPullRequests()}
+     */
+    @Deprecated
+    public List<GHPullRequest> getPullRequests(GHIssueState state) throws IOException {
+        return queryPullRequests().state(state).list().toList();
+    }
+
     /**
      * Retrieves pull requests.
      *
diff --git a/src/main/java/org/kohsuke/github/GitHub.java b/src/main/java/org/kohsuke/github/GitHub.java
index 8ef21e2cd..33cc329be 100644
--- a/src/main/java/org/kohsuke/github/GitHub.java
+++ b/src/main/java/org/kohsuke/github/GitHub.java
@@ -1299,6 +1299,21 @@ public class GitHub {
         return requester;
     }
 
+    /**
+     * Creates a request to GitHub GraphQL API.
+     *
+     * @param query
+     *            the query for the GraphQL
+     * @return the requester
+     */
+    @Nonnull
+    Requester createGraphQLRequest(String query) {
+        return createRequest().method("POST")
+                .rateLimit(RateLimitTarget.GRAPHQL)
+                .with("query", query)
+                .withUrlPath("/graphql");
+    }
+
     /**
      * Intern.
      *
diff --git a/src/main/java/org/kohsuke/github/GitHubClient.java b/src/main/java/org/kohsuke/github/GitHubClient.java
index f669280b4..176e6cb98 100644
--- a/src/main/java/org/kohsuke/github/GitHubClient.java
+++ b/src/main/java/org/kohsuke/github/GitHubClient.java
@@ -629,6 +629,7 @@ class GitHubClient {
         LOGGER.log(FINEST, () -> {
             String body;
             try {
+                response.setBodyStreamRereadable();
                 body = GitHubResponse.getBodyAsString(response);
             } catch (Throwable e) {
                 body = "Error reading response body";
diff --git a/src/main/java/org/kohsuke/github/Requester.java b/src/main/java/org/kohsuke/github/Requester.java
index ad65f1a2d..8a012ef0e 100644
--- a/src/main/java/org/kohsuke/github/Requester.java
+++ b/src/main/java/org/kohsuke/github/Requester.java
@@ -27,6 +27,7 @@ import edu.umd.cs.findbugs.annotations.NonNull;
 import org.apache.commons.io.IOUtils;
 import org.kohsuke.github.connector.GitHubConnectorResponse;
 import org.kohsuke.github.function.InputStreamFunction;
+import org.kohsuke.github.internal.graphql.response.GHGraphQLResponse;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -103,6 +104,37 @@ class Requester extends GitHubRequest.Builder<Requester> {
                 .body();
     }
 
+    /**
+     * Sends a GraphQL request with no response
+     *
+     * @throws IOException
+     *             the io exception
+     */
+    public void sendGraphQL() throws IOException {
+        fetchGraphQL(GHGraphQLResponse.ObjectResponse.class);
+    }
+
+    /**
+     * Sends a request and parses the response into the given type via databinding in GraphQL response.
+     *
+     * @param <T>
+     *            the type parameter
+     * @param type
+     *            the type
+     * @return an instance of {@code GHGraphQLResponse<T>}
+     * @throws IOException
+     *             if the server returns 4xx/5xx responses.
+     */
+    public <T extends GHGraphQLResponse<S>, S> S fetchGraphQL(@Nonnull Class<T> type) throws IOException {
+        T response = fetch(type);
+
+        if (!response.isSuccessful()) {
+            throw new IOException("GraphQL request failed by:" + response.getErrorMessages());
+        }
+
+        return response.getData();
+    }
+
     /**
      * Makes a request and just obtains the HTTP status code. Method does not throw exceptions for many status codes
      * that would otherwise throw.
diff --git a/src/main/java/org/kohsuke/github/connector/GitHubConnectorResponse.java b/src/main/java/org/kohsuke/github/connector/GitHubConnectorResponse.java
index b71fc8abc..3098105eb 100644
--- a/src/main/java/org/kohsuke/github/connector/GitHubConnectorResponse.java
+++ b/src/main/java/org/kohsuke/github/connector/GitHubConnectorResponse.java
@@ -7,15 +7,25 @@ import java.io.ByteArrayInputStream;
 import java.io.Closeable;
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
 import java.util.zip.GZIPInputStream;
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nonnull;
 
+import static java.net.HttpURLConnection.HTTP_OK;
+
 /**
  * Response information supplied when a response is received and before the body is processed.
  * <p>
+ * During a request to GitHub, {@link GitHubConnector#send(GitHubConnectorRequest)} returns a
+ * {@link GitHubConnectorResponse}. This is processed to create a GitHubResponse.
+ * <p>
  * Instances of this class are closed once the response is done being processed. This means that {@link #bodyStream()}
  * will not be readable after a call is completed.
  *
@@ -35,6 +45,11 @@ public abstract class GitHubConnectorResponse implements Closeable {
     private final GitHubConnectorRequest request;
     @Nonnull
     private final Map<String, List<String>> headers;
+    private boolean bodyStreamCalled = false;
+    private InputStream bodyStream = null;
+    private byte[] bodyBytes = null;
+    private boolean isClosed = false;
+    private boolean isBodyStreamRereadable;
 
     /**
      * GitHubConnectorResponse constructor
@@ -58,6 +73,7 @@ public abstract class GitHubConnectorResponse implements Closeable {
             caseInsensitiveMap.put(entry.getKey(), Collections.unmodifiableList(new ArrayList<>(entry.getValue())));
         }
         this.headers = Collections.unmodifiableMap(caseInsensitiveMap);
+        this.isBodyStreamRereadable = false;
     }
 
     /**
@@ -79,17 +95,72 @@ public abstract class GitHubConnectorResponse implements Closeable {
     /**
      * The response body as an {@link InputStream}.
      *
+     * When {@link #isBodyStreamRereadable} is false, {@link #bodyStream()} can only be called once and the returned
+     * stream should be assumed to be read-once and not resetable. This is the default behavior for HTTP_OK responses
+     * and significantly reduces memory usage.
+     *
+     * When {@link #isBodyStreamRereadable} is true, {@link #bodyStream()} can be called be called multiple times. The
+     * full stream data is read into a byte array during the first call. Each call returns a new stream backed by the
+     * same byte array. This uses more memory, but is required to enable rereading the body stream during trace logging,
+     * debugging, and error responses.
+     *
      * @return the response body
      * @throws IOException
      *             if response stream is null or an I/O Exception occurs.
      */
     @Nonnull
-    public abstract InputStream bodyStream() throws IOException;
+    public InputStream bodyStream() throws IOException {
+        synchronized (this) {
+            if (isClosed) {
+                throw new IOException("Response is closed");
+            }
+
+            if (bodyStreamCalled) {
+                if (!isBodyStreamRereadable()) {
+                    throw new IOException("Response body not rereadable");
+                }
+            } else {
+                bodyStream = wrapStream(rawBodyStream());
+                bodyStreamCalled = true;
+            }
+
+            if (bodyStream == null) {
+                throw new IOException("Response body missing, stream null");
+            } else if (!isBodyStreamRereadable()) {
+                return bodyStream;
+            }
+
+            // Load rereadable byte array
+            if (bodyBytes == null) {
+                bodyBytes = IOUtils.toByteArray(bodyStream);
+                // Close the raw body stream after successfully reading
+                IOUtils.closeQuietly(bodyStream);
+            }
+
+            return new ByteArrayInputStream(bodyBytes);
+        }
+    }
 
     /**
-     * Gets the {@link GitHubConnectorRequest} for this response.
+     * Get the raw implementation specific body stream for this response.
+     *
+     * This method will only be called once to completion. If an exception is thrown by this method, it may be called
+     * multiple times.
      *
-     * @return the {@link GitHubConnectorRequest} for this response.
+     * The stream returned from this method will be closed when the response is closed or sooner. Inheriting classes do
+     * not need to close it.
+     *
+     * @return the stream for the raw response
+     * @throws IOException
+     *             if an I/O Exception occurs.
+     */
+    @CheckForNull
+    protected abstract InputStream rawBodyStream() throws IOException;
+
+    /**
+     * Gets the {@link GitHubConnector} for this response.
+     *
+     * @return the {@link GitHubConnector} for this response.
      */
     @Nonnull
     public GitHubConnectorRequest request() {
@@ -116,6 +187,56 @@ public abstract class GitHubConnectorResponse implements Closeable {
         return headers;
     }
 
+    /**
+     * The body stream rereadable state.
+     *
+     * Body stream defaults to read once for HTTP_OK responses (to reduce memory usage). For non-HTTP_OK responses, body
+     * stream is switched to rereadable (in-memory byte array) for error processing.
+     *
+     * Calling {@link #setBodyStreamRereadable()} will force {@link #isBodyStreamRereadable} to be true for this
+     * response regardless of {@link #statusCode} value.
+     *
+     * @return true when body stream is rereadable.
+     */
+    public boolean isBodyStreamRereadable() {
+        synchronized (this) {
+            return isBodyStreamRereadable || statusCode != HTTP_OK;
+        }
+    }
+
+    /**
+     * Force body stream to rereadable regardless of status code.
+     *
+     * Calling {@link #setBodyStreamRereadable()} will force {@link #isBodyStreamRereadable} to be true for this
+     * response regardless of {@link #statusCode} value.
+     *
+     * This is required to support body value logging during low-level tracing but should be avoided in general since it
+     * consumes significantly more memory.
+     *
+     * Will throw runtime exception if a non-rereadable body stream has already been returned from
+     * {@link #bodyStream()}.
+     */
+    public void setBodyStreamRereadable() {
+        synchronized (this) {
+            if (bodyStreamCalled && !isBodyStreamRereadable()) {
+                throw new RuntimeException("bodyStream() already called in read-once mode");
+            }
+            isBodyStreamRereadable = true;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void close() throws IOException {
+        synchronized (this) {
+            IOUtils.closeQuietly(bodyStream);
+            isClosed = true;
+            this.bodyBytes = null;
+        }
+    }
+
     /**
      * Handles wrapping the body stream if indicated by the "Content-Encoding" header.
      *
@@ -155,13 +276,12 @@ public abstract class GitHubConnectorResponse implements Closeable {
 
     /**
      * A ByteArrayResponse class
+     *
+     * @deprecated Inherit directly from {@link GitHubConnectorResponse}.
      */
+    @Deprecated
     public abstract static class ByteArrayResponse extends GitHubConnectorResponse {
 
-        private boolean inputStreamRead = false;
-        private byte[] inputBytes = null;
-        private boolean isClosed = false;
-
         /**
          * Constructor for ByteArray Response
          *
@@ -177,52 +297,5 @@ public abstract class GitHubConnectorResponse implements Closeable {
                 @Nonnull Map<String, List<String>> headers) {
             super(request, statusCode, headers);
         }
-
-        /**
-         * {@inheritDoc}
-         */
-        @Override
-        @Nonnull
-        public InputStream bodyStream() throws IOException {
-            if (isClosed) {
-                throw new IOException("Response is closed");
-            }
-            synchronized (this) {
-                if (!inputStreamRead) {
-                    InputStream rawStream = rawBodyStream();
-                    try (InputStream stream = wrapStream(rawStream)) {
-                        if (stream != null) {
-                            inputBytes = IOUtils.toByteArray(stream);
-                        }
-                    }
-                    inputStreamRead = true;
-                }
-            }
-
-            if (inputBytes == null) {
-                throw new IOException("Response body missing, stream null");
-            }
-
-            return new ByteArrayInputStream(inputBytes);
-        }
-
-        /**
-         * Get the raw implementation specific body stream for this response.
-         *
-         * This method will only be called once to completion. If an exception is thrown, it may be called multiple
-         * times.
-         *
-         * @return the stream for the raw response
-         * @throws IOException
-         *             if an I/O Exception occurs.
-         */
-        @CheckForNull
-        protected abstract InputStream rawBodyStream() throws IOException;
-
-        @Override
-        public void close() throws IOException {
-            isClosed = true;
-            this.inputBytes = null;
-        }
     }
 }
diff --git a/src/main/java/org/kohsuke/github/extras/HttpClientGitHubConnector.java b/src/main/java/org/kohsuke/github/extras/HttpClientGitHubConnector.java
index 52f7e610d..aaf9d9acb 100644
--- a/src/main/java/org/kohsuke/github/extras/HttpClientGitHubConnector.java
+++ b/src/main/java/org/kohsuke/github/extras/HttpClientGitHubConnector.java
@@ -93,7 +93,7 @@ public class HttpClientGitHubConnector implements GitHubConnector {
      *
      * Implementation specific to {@link HttpResponse}.
      */
-    private static class HttpClientGitHubConnectorResponse extends GitHubConnectorResponse.ByteArrayResponse {
+    private static class HttpClientGitHubConnectorResponse extends GitHubConnectorResponse {
 
         @Nonnull
         private final HttpResponse<InputStream> response;
@@ -113,7 +113,6 @@ public class HttpClientGitHubConnector implements GitHubConnector {
         @Override
         public void close() throws IOException {
             super.close();
-            IOUtils.closeQuietly(response.body());
         }
     }
 }
diff --git a/src/main/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnector.java b/src/main/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnector.java
index d61fde220..48ec9e137 100644
--- a/src/main/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnector.java
+++ b/src/main/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnector.java
@@ -2,7 +2,6 @@ package org.kohsuke.github.extras.okhttp3;
 
 import okhttp3.*;
 import org.apache.commons.io.IOUtils;
-import org.kohsuke.github.*;
 import org.kohsuke.github.connector.GitHubConnector;
 import org.kohsuke.github.connector.GitHubConnectorRequest;
 import org.kohsuke.github.connector.GitHubConnectorResponse;
@@ -104,7 +103,7 @@ public class OkHttpGitHubConnector implements GitHubConnector {
      *
      * Implementation specific to {@link okhttp3.Response}.
      */
-    private static class OkHttpGitHubConnectorResponse extends GitHubConnectorResponse.ByteArrayResponse {
+    private static class OkHttpGitHubConnectorResponse extends GitHubConnectorResponse {
 
         @Nonnull
         private final Response response;
diff --git a/src/main/java/org/kohsuke/github/internal/graphql/response/GHGraphQLResponse.java b/src/main/java/org/kohsuke/github/internal/graphql/response/GHGraphQLResponse.java
new file mode 100644
index 000000000..54960aa55
--- /dev/null
+++ b/src/main/java/org/kohsuke/github/internal/graphql/response/GHGraphQLResponse.java
@@ -0,0 +1,93 @@
+package org.kohsuke.github.internal.graphql.response;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * A response of GraphQL.
+ * <p>
+ * This class is used to parse the response of GraphQL.
+ * </p>
+ *
+ * @param <T>
+ *            the type of data
+ */
+public class GHGraphQLResponse<T> {
+
+    private final T data;
+
+    private final List<GraphQLError> errors;
+
+    /**
+     * @param data
+     *            GraphQL success response
+     * @param errors
+     *            GraphQL failure response, This will be empty if not fail
+     */
+    @JsonCreator
+    @SuppressFBWarnings(value = { "EI_EXPOSE_REP2" }, justification = "Spotbugs also doesn't like this")
+    public GHGraphQLResponse(@JsonProperty("data") T data, @JsonProperty("errors") List<GraphQLError> errors) {
+        if (errors == null) {
+            errors = Collections.emptyList();
+        }
+        this.data = data;
+        this.errors = Collections.unmodifiableList(errors);
+    }
+
+    /**
+     * @return request is succeeded. True when error list is empty.
+     */
+    public boolean isSuccessful() {
+        return errors.isEmpty();
+    }
+
+    /**
+     * @return GraphQL success response
+     */
+    public T getData() {
+        if (!isSuccessful()) {
+            throw new RuntimeException("Response not successful, data invalid");
+        }
+
+        return data;
+    }
+
+    /**
+     * @return GraphQL error messages from Github Response. Empty list when no errors occurred.
+     */
+    public List<String> getErrorMessages() {
+        return errors.stream().map(GraphQLError::getMessage).collect(Collectors.toList());
+    }
+
+    /**
+     * A error of GraphQL response. Minimum implementation for GraphQL error.
+     */
+    @SuppressFBWarnings(value = { "UWF_UNWRITTEN_FIELD", "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" },
+            justification = "JSON API")
+    private static class GraphQLError {
+        private String message;
+
+        public String getMessage() {
+            return message;
+        }
+    }
+
+    /**
+     * A GraphQL response with basic Object data type.
+     */
+    public static class ObjectResponse extends GHGraphQLResponse<Object> {
+        /**
+         * {@inheritDoc}
+         */
+        @JsonCreator
+        @SuppressFBWarnings(value = { "EI_EXPOSE_REP2" }, justification = "Spotbugs also doesn't like this")
+        public ObjectResponse(@JsonProperty("data") Object data, @JsonProperty("errors") List<GraphQLError> errors) {
+            super(data, errors);
+        }
+    }
+}
diff --git a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json
index 4d691214e..24935c34b 100644
--- a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json
+++ b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/reflect-config.json
@@ -6703,5 +6703,95 @@
     "allDeclaredMethods": true,
     "allPublicClasses": true,
     "allDeclaredClasses": true
+  },
+  {
+    "name": "org.kohsuke.github.GHPullRequest$EnablePullRequestAutoMergeResponse",
+    "allPublicFields": true,
+    "allDeclaredFields": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredConstructors": true,
+    "allPublicConstructors": true,
+    "allDeclaredConstructors": true,
+    "queryAllPublicMethods": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredMethods": true,
+    "allPublicClasses": true,
+    "allDeclaredClasses": true
+  },
+  {
+    "name": "org.kohsuke.github.GHPullRequest$EnablePullRequestAutoMergeResponse$EnablePullRequestAutoMerge",
+    "allPublicFields": true,
+    "allDeclaredFields": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredConstructors": true,
+    "allPublicConstructors": true,
+    "allDeclaredConstructors": true,
+    "queryAllPublicMethods": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredMethods": true,
+    "allPublicClasses": true,
+    "allDeclaredClasses": true
+  },
+  {
+    "name": "org.kohsuke.github.GHPullRequest$EnablePullRequestAutoMergeResponse$EnablePullRequestAutoMerge$EnablePullRequestAutoMergePullRequest",
+    "allPublicFields": true,
+    "allDeclaredFields": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredConstructors": true,
+    "allPublicConstructors": true,
+    "allDeclaredConstructors": true,
+    "queryAllPublicMethods": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredMethods": true,
+    "allPublicClasses": true,
+    "allDeclaredClasses": true
+  },
+  {
+    "name": "org.kohsuke.github.internal.graphql.response.GHGraphQLResponse",
+    "allPublicFields": true,
+    "allDeclaredFields": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredConstructors": true,
+    "allPublicConstructors": true,
+    "allDeclaredConstructors": true,
+    "queryAllPublicMethods": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredMethods": true,
+    "allPublicClasses": true,
+    "allDeclaredClasses": true
+  },
+  {
+    "name": "org.kohsuke.github.internal.graphql.response.GHGraphQLResponse$GraphQLError",
+    "allPublicFields": true,
+    "allDeclaredFields": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredConstructors": true,
+    "allPublicConstructors": true,
+    "allDeclaredConstructors": true,
+    "queryAllPublicMethods": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredMethods": true,
+    "allPublicClasses": true,
+    "allDeclaredClasses": true
+  },
+  {
+    "name": "org.kohsuke.github.internal.graphql.response.GHGraphQLResponse$ObjectResponse",
+    "allPublicFields": true,
+    "allDeclaredFields": true,
+    "queryAllPublicConstructors": true,
+    "queryAllDeclaredConstructors": true,
+    "allPublicConstructors": true,
+    "allDeclaredConstructors": true,
+    "queryAllPublicMethods": true,
+    "queryAllDeclaredMethods": true,
+    "allPublicMethods": true,
+    "allDeclaredMethods": true,
+    "allPublicClasses": true,
+    "allDeclaredClasses": true
   }
 ]
diff --git a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json
index 3e80bb939..0bb21a162 100644
--- a/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json
+++ b/src/main/resources/META-INF/native-image/org.kohsuke/github-api/serialization-config.json
@@ -1342,5 +1342,23 @@
   },
   {
     "name": "org.kohsuke.github.SkipFromToString"
+  },
+  {
+    "name": "org.kohsuke.github.GHPullRequest$EnablePullRequestAutoMergeResponse"
+  },
+  {
+    "name": "org.kohsuke.github.GHPullRequest$EnablePullRequestAutoMergeResponse$EnablePullRequestAutoMerge"
+  },
+  {
+    "name": "org.kohsuke.github.GHPullRequest$EnablePullRequestAutoMergeResponse$EnablePullRequestAutoMerge$EnablePullRequestAutoMergePullRequest"
+  },
+  {
+    "name": "org.kohsuke.github.internal.graphql.response.GHGraphQLResponse"
+  },
+  {
+    "name": "org.kohsuke.github.internal.graphql.response.GHGraphQLResponse$GraphQLError"
+  },
+  {
+    "name": "org.kohsuke.github.internal.graphql.response.GHGraphQLResponse$ObjectResponse"
   }
 ]


Test patch:
diff --git a/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java b/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java
index 7cea51bda..7d85d343e 100644
--- a/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java
+++ b/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java
@@ -19,7 +19,6 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.*;
 
-import static org.hamcrest.Matchers.*;
 import static org.junit.Assume.assumeFalse;
 import static org.junit.Assume.assumeTrue;
 
diff --git a/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java b/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java
index 45dd9af9f..b84c90554 100644
--- a/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java
+++ b/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java
@@ -33,5 +33,4 @@ public class GHPullRequestMockTest {
 
         assertThat("Mock should return true", pullRequest.isDraft());
     }
-
 }
diff --git a/src/test/java/org/kohsuke/github/GHPullRequestTest.java b/src/test/java/org/kohsuke/github/GHPullRequestTest.java
index 0a2e4a271..ba4319575 100644
--- a/src/test/java/org/kohsuke/github/GHPullRequestTest.java
+++ b/src/test/java/org/kohsuke/github/GHPullRequestTest.java
@@ -918,9 +918,7 @@ public class GHPullRequestTest extends AbstractGitHubWireMockTest {
         prSingle.getMergeable();
         assertThat(prSingle.getUser().root(), notNullValue());
 
-        PagedIterable<GHPullRequest> ghPullRequests = getRepository().queryPullRequests()
-                .state(GHIssueState.OPEN)
-                .list();
+        List<GHPullRequest> ghPullRequests = getRepository().getPullRequests(GHIssueState.OPEN);
         for (GHPullRequest pr : ghPullRequests) {
             assertThat(pr.getUser().root(), notNullValue());
             pr.getMergeable();
@@ -1036,6 +1034,65 @@ public class GHPullRequestTest extends AbstractGitHubWireMockTest {
         pullRequestFromSearchResults.close();
     }
 
+    /**
+     *
+     * Test enabling auto merge for pull request
+     *
+     * @throws IOException
+     *             the Exception
+     */
+    @Test
+    public void enablePullRequestAutoMerge() throws IOException {
+        String authorEmail = "sa20207@naver.com";
+        String clientMutationId = "github-api";
+        String commitBody = "This is commit body.";
+        String commitTitle = "This is commit title.";
+        String expectedCommitHeadOid = "4888b44d7204dd05680e90159af839c8b1194b6d";
+
+        GHPullRequest pullRequest = gitHub.getRepository("seate/for-test").getPullRequest(9);
+
+        pullRequest.enablePullRequestAutoMerge(authorEmail,
+                clientMutationId,
+                commitBody,
+                commitTitle,
+                expectedCommitHeadOid,
+                GHPullRequest.MergeMethod.MERGE);
+
+        AutoMerge autoMerge = pullRequest.getAutoMerge();
+        assertThat(autoMerge.getEnabledBy().getEmail(), is(authorEmail));
+        assertThat(autoMerge.getCommitMessage(), is(commitBody));
+        assertThat(autoMerge.getCommitTitle(), is(commitTitle));
+        assertThat(autoMerge.getMergeMethod(), is(GHPullRequest.MergeMethod.MERGE));
+    }
+
+    /**
+     * Test enabling auto merge for pull request with no verified email throws GraphQL exception
+     *
+     * @throws IOException
+     *             the io exception
+     */
+    @Test
+    public void enablePullRequestAutoMergeFailure() throws IOException {
+        String authorEmail = "failureEmail@gmail.com";
+        String clientMutationId = "github-api";
+        String commitBody = "This is commit body.";
+        String commitTitle = "This is commit title.";
+        String expectedCommitHeadOid = "4888b44d7204dd05680e90159af839c8b1194b6d";
+
+        GHPullRequest pullRequest = gitHub.getRepository("seate/for-test").getPullRequest(9);
+
+        try {
+            pullRequest.enablePullRequestAutoMerge(authorEmail,
+                    clientMutationId,
+                    commitBody,
+                    commitTitle,
+                    expectedCommitHeadOid,
+                    null);
+        } catch (IOException e) {
+            assertThat(e.getMessage(), containsString("does not have a verified email"));
+        }
+    }
+
     /**
      * Gets the repository.
      *
diff --git a/src/test/java/org/kohsuke/github/GHRateLimitTest.java b/src/test/java/org/kohsuke/github/GHRateLimitTest.java
index 5ec59ebb5..b7c8c807a 100644
--- a/src/test/java/org/kohsuke/github/GHRateLimitTest.java
+++ b/src/test/java/org/kohsuke/github/GHRateLimitTest.java
@@ -188,7 +188,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest {
         // Verify the requesting a search url updates the search rate limit
         assertThat(gitHub.lastRateLimit().getSearch().getRemaining(), equalTo(30));
 
-        HashMap<String, Object> searchResult = (HashMap<String, Object>) gitHub.createRequest()
+        HashMap<String, Object> searchResult = gitHub.createRequest()
                 .rateLimit(RateLimitTarget.SEARCH)
                 .setRawUrlPath(mockGitHub.apiServer().baseUrl()
                         + "/search/repositories?q=tetris+language%3Aassembly&sort=stars&order=desc")
diff --git a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java
index e3727d7c5..2d9d63dd3 100644
--- a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java
+++ b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java
@@ -9,6 +9,7 @@ import org.kohsuke.github.GHWorkflowRun.Conclusion;
 import org.kohsuke.github.GHWorkflowRun.Status;
 import org.kohsuke.github.function.InputStreamFunction;
 
+import java.io.ByteArrayInputStream;
 import java.io.IOException;
 import java.time.Duration;
 import java.time.Instant;
@@ -18,6 +19,8 @@ import java.util.List;
 import java.util.Optional;
 import java.util.Scanner;
 import java.util.function.Function;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 import java.util.stream.Collectors;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
@@ -393,8 +396,14 @@ public class GHWorkflowRunTest extends AbstractGitHubWireMockTest {
         checkArtifactProperties(artifacts.get(0), "artifact1");
         checkArtifactProperties(artifacts.get(1), "artifact2");
 
+        Logger clientLogger = Logger.getLogger(GitHubClient.class.getName());
+
         // Test download from upload-artifact@v3 infrastructure
         String artifactContent = artifacts.get(0).download((is) -> {
+            // At finest log level, all body responses are byte arrays.
+            if (clientLogger.getLevel() != Level.FINEST) {
+                assertThat(is, not(isA(ByteArrayInputStream.class)));
+            }
             try (ZipInputStream zis = new ZipInputStream(is)) {
                 StringBuilder sb = new StringBuilder();
 
diff --git a/src/test/java/org/kohsuke/github/GitHubStaticTest.java b/src/test/java/org/kohsuke/github/GitHubStaticTest.java
index a00f4c95b..5c4e9b68e 100644
--- a/src/test/java/org/kohsuke/github/GitHubStaticTest.java
+++ b/src/test/java/org/kohsuke/github/GitHubStaticTest.java
@@ -19,7 +19,6 @@ import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.not;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
 import static org.junit.Assert.assertThrows;
-import static org.junit.Assert.fail;
 
 // TODO: Auto-generated Javadoc
 /**
diff --git a/src/test/java/org/kohsuke/github/RequesterRetryTest.java b/src/test/java/org/kohsuke/github/RequesterRetryTest.java
index 81a8b34ec..fb031ce6d 100644
--- a/src/test/java/org/kohsuke/github/RequesterRetryTest.java
+++ b/src/test/java/org/kohsuke/github/RequesterRetryTest.java
@@ -3,18 +3,17 @@ package org.kohsuke.github;
 import okhttp3.ConnectionPool;
 import okhttp3.OkHttpClient;
 import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.kohsuke.github.connector.GitHubConnector;
 import org.kohsuke.github.connector.GitHubConnectorRequest;
 import org.kohsuke.github.connector.GitHubConnectorResponse;
+import org.kohsuke.github.connector.GitHubConnectorResponseTest;
 import org.kohsuke.github.extras.HttpClientGitHubConnector;
 import org.kohsuke.github.extras.okhttp3.OkHttpGitHubConnector;
 
 import java.io.*;
-import java.net.URL;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -566,55 +565,12 @@ public class RequesterRetryTest extends AbstractGitHubWireMockTest {
         }
     }
 
-    private static final GitHubConnectorRequest IGNORED_EMPTY_REQUEST = new GitHubConnectorRequest() {
-        @NotNull
-        @Override
-        public String method() {
-            return null;
-        }
-
-        @NotNull
-        @Override
-        public Map<String, List<String>> allHeaders() {
-            return null;
-        }
-
-        @Nullable
-        @Override
-        public String header(String name) {
-            return null;
-        }
-
-        @Nullable
-        @Override
-        public String contentType() {
-            return null;
-        }
-
-        @Nullable
-        @Override
-        public InputStream body() {
-            return null;
-        }
-
-        @NotNull
-        @Override
-        public URL url() {
-            return null;
-        }
-
-        @Override
-        public boolean hasBody() {
-            return false;
-        }
-    };
-
     private static class GitHubConnectorResponseWrapper extends GitHubConnectorResponse {
 
         private final GitHubConnectorResponse wrapped;
 
         GitHubConnectorResponseWrapper(GitHubConnectorResponse response) {
-            super(IGNORED_EMPTY_REQUEST, -1, new HashMap<>());
+            super(GitHubConnectorResponseTest.EMPTY_REQUEST, -1, new HashMap<>());
             wrapped = response;
         }
 
@@ -651,6 +607,12 @@ public class RequesterRetryTest extends AbstractGitHubWireMockTest {
         public void close() throws IOException {
             wrapped.close();
         }
+
+        @Override
+        protected InputStream rawBodyStream() throws IOException {
+            // TODO Auto-generated method stub
+            throw new UnsupportedOperationException("Unimplemented method 'rawBodyStream'");
+        }
     }
 
     /**
diff --git a/src/test/java/org/kohsuke/github/connector/GitHubConnectorResponseTest.java b/src/test/java/org/kohsuke/github/connector/GitHubConnectorResponseTest.java
new file mode 100644
index 000000000..fbc209890
--- /dev/null
+++ b/src/test/java/org/kohsuke/github/connector/GitHubConnectorResponseTest.java
@@ -0,0 +1,223 @@
+package org.kohsuke.github.connector;
+
+import com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream;
+import org.apache.commons.io.IOUtils;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.junit.Assert;
+import org.junit.Test;
+import org.kohsuke.github.AbstractGitHubWireMockTest;
+import org.kohsuke.github.connector.GitHubConnectorResponse.ByteArrayResponse;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.isA;
+
+/**
+ * Test GitHubConnectorResponse
+ */
+public class GitHubConnectorResponseTest extends AbstractGitHubWireMockTest {
+
+    /**
+     * Test basic body stream.
+     *
+     * @throws Exception
+     *             for failures
+     */
+    @Test
+    public void testBodyStream() throws Exception {
+        Exception e;
+        GitHubConnectorResponse response = new CustomBodyGitHubConnectorResponse(200,
+                new ByteBufferBackedInputStream(ByteBuffer.wrap("Hello!".getBytes(StandardCharsets.UTF_8))));
+        InputStream stream = response.bodyStream();
+        assertThat(stream, isA(ByteBufferBackedInputStream.class));
+        String bodyString = IOUtils.toString(stream, StandardCharsets.UTF_8);
+        assertThat(bodyString, equalTo("Hello!"));
+
+        // Cannot change to rereadable
+        e = Assert.assertThrows(RuntimeException.class, () -> response.setBodyStreamRereadable());
+        assertThat(e.getMessage(), equalTo("bodyStream() already called in read-once mode"));
+
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response body not rereadable"));
+        response.close();
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response is closed"));
+    }
+
+    /**
+     * Test rereadable body stream.
+     *
+     * @throws Exception
+     *             for failures
+     */
+    @Test
+    public void tesBodyStream_rereadable() throws Exception {
+        Exception e;
+        GitHubConnectorResponse response = new CustomBodyGitHubConnectorResponse(404,
+                new ByteBufferBackedInputStream(ByteBuffer.wrap("Hello!".getBytes(StandardCharsets.UTF_8))));
+        InputStream stream = response.bodyStream();
+        assertThat(stream, isA(ByteArrayInputStream.class));
+        String bodyString = IOUtils.toString(stream, StandardCharsets.UTF_8);
+        assertThat(bodyString, equalTo("Hello!"));
+
+        // Buffered response can be read multiple times
+        bodyString = IOUtils.toString(response.bodyStream(), StandardCharsets.UTF_8);
+        assertThat(bodyString, equalTo("Hello!"));
+
+        // should have no effect if already rereadable
+        response.setBodyStreamRereadable();
+
+        response.close();
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response is closed"));
+    }
+
+    /**
+     * Test forced rereadable body stream.
+     *
+     * @throws Exception
+     *             for failures
+     */
+    @Test
+    public void tesBodyStream_forced() throws Exception {
+        Exception e;
+        GitHubConnectorResponse response = new CustomBodyGitHubConnectorResponse(200,
+                new ByteBufferBackedInputStream(ByteBuffer.wrap("Hello!".getBytes(StandardCharsets.UTF_8))));
+        // 200 status would be streamed body, force to buffered
+        response.setBodyStreamRereadable();
+
+        InputStream stream = response.bodyStream();
+        assertThat(stream, isA(ByteArrayInputStream.class));
+        String bodyString = IOUtils.toString(stream, StandardCharsets.UTF_8);
+        assertThat(bodyString, equalTo("Hello!"));
+
+        // Buffered response can be read multiple times
+        bodyString = IOUtils.toString(response.bodyStream(), StandardCharsets.UTF_8);
+        assertThat(bodyString, equalTo("Hello!"));
+
+        response.close();
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response is closed"));
+    }
+
+    /**
+     * Test null body stream.
+     *
+     * @throws Exception
+     *             for failures
+     */
+    @Test
+    public void testBodyStream_null() throws Exception {
+        Exception e;
+        GitHubConnectorResponse response = new CustomBodyGitHubConnectorResponse(200, null);
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response body missing, stream null"));
+
+        // Cannot change to rereadable
+        e = Assert.assertThrows(RuntimeException.class, () -> response.setBodyStreamRereadable());
+        assertThat(e.getMessage(), equalTo("bodyStream() already called in read-once mode"));
+
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response body not rereadable"));
+
+        response.close();
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response is closed"));
+    }
+
+    /**
+     * Test null rereadable body stream.
+     *
+     * @throws Exception
+     *             for failures
+     */
+    @Test
+    public void testBodyStream_null_buffered() throws Exception {
+        Exception e;
+        GitHubConnectorResponse response = new CustomBodyGitHubConnectorResponse(404, null);
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response body missing, stream null"));
+        // Buffered response can be read multiple times
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response body missing, stream null"));
+
+        // force should have no effect after first read attempt
+        response.setBodyStreamRereadable();
+
+        response.close();
+        e = Assert.assertThrows(IOException.class, () -> response.bodyStream());
+        assertThat(e.getMessage(), equalTo("Response is closed"));
+    }
+
+    // Extend ByteArrayResponse to preserve test coverage
+    private static class CustomBodyGitHubConnectorResponse extends ByteArrayResponse {
+        private final InputStream stream;
+
+        CustomBodyGitHubConnectorResponse(int statusCode, InputStream stream) {
+            super(EMPTY_REQUEST, statusCode, new HashMap<>());
+            this.stream = stream;
+        }
+
+        @Override
+        protected InputStream rawBodyStream() throws IOException {
+            return stream;
+        }
+    }
+
+    /**
+     * Empty request for response testing.
+     */
+    public static final GitHubConnectorRequest EMPTY_REQUEST = new GitHubConnectorRequest() {
+        @NotNull
+        @Override
+        public String method() {
+            return null;
+        }
+
+        @NotNull
+        @Override
+        public Map<String, List<String>> allHeaders() {
+            return null;
+        }
+
+        @Nullable
+        @Override
+        public String header(String name) {
+            return null;
+        }
+
+        @Nullable
+        @Override
+        public String contentType() {
+            return null;
+        }
+
+        @Nullable
+        @Override
+        public InputStream body() {
+            return null;
+        }
+
+        @NotNull
+        @Override
+        public URL url() {
+            return null;
+        }
+
+        @Override
+        public boolean hasBody() {
+            return false;
+        }
+    };
+
+}
diff --git a/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java b/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java
index f66717f31..b58b784dc 100644
--- a/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java
+++ b/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java
@@ -19,8 +19,6 @@ import org.kohsuke.github.GitHub;
 import java.io.File;
 import java.io.IOException;
 
-import static org.junit.Assert.fail;
-
 // TODO: Auto-generated Javadoc
 /**
  * Test showing the behavior of OkHttpGitHubConnector cache with GitHub 404 responses.
diff --git a/src/test/java/org/kohsuke/github/internal/graphql/response/GHGraphQLResponseMockTest.java b/src/test/java/org/kohsuke/github/internal/graphql/response/GHGraphQLResponseMockTest.java
new file mode 100644
index 000000000..5365c9e69
--- /dev/null
+++ b/src/test/java/org/kohsuke/github/internal/graphql/response/GHGraphQLResponseMockTest.java
@@ -0,0 +1,74 @@
+package org.kohsuke.github.internal.graphql.response;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JavaType;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectReader;
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.containsString;
+import static org.hamcrest.Matchers.empty;
+import static org.hamcrest.Matchers.is;
+
+/**
+ * Test GHGraphQLResponse's methods
+ */
+class GHGraphQLResponseMockTest {
+
+    /**
+     * Test get data throws exception when response means error
+     *
+     * @throws JsonProcessingException
+     *             Json parse exception
+     *
+     */
+    @Test
+    void getDataFailure() throws JsonProcessingException {
+        String graphQLErrorResponse = "{\"data\": {\"enablePullRequestAutoMerge\": null},\"errors\": [{\"type\": "
+                + "\"UNPROCESSABLE\",\"path\": [\"enablePullRequestAutoMerge\"],\"locations\": [{\"line\": 2,"
+                + "\"column\": 5}],\"message\": \"hub4j does not have a verified email, which is required to enable "
+                + "auto-merging.\"}]}";
+
+        GHGraphQLResponse<Object> response = convertJsonToGraphQLResponse(graphQLErrorResponse);
+
+        try {
+            response.getData();
+        } catch (RuntimeException e) {
+            assertThat(e.getMessage(), containsString("Response not successful, data invalid"));
+        }
+    }
+
+    /**
+     * Test getErrorMessages throws exception when response means not error
+     *
+     * @throws JsonProcessingException
+     *             Json parse exception
+     */
+    @Test
+    void getErrorMessagesFailure() throws JsonProcessingException {
+        String graphQLSuccessResponse = "{\"data\": {\"repository\": {\"pullRequest\": {\"id\": "
+                + "\"PR_TEMP_GRAPHQL_ID\"}}}}";
+
+        GHGraphQLResponse<Object> response = convertJsonToGraphQLResponse(graphQLSuccessResponse);
+
+        List<String> errorMessages = response.getErrorMessages();
+
+        assertThat(errorMessages, is(empty()));
+    }
+
+    private GHGraphQLResponse<Object> convertJsonToGraphQLResponse(String json) throws JsonProcessingException {
+        ObjectMapper objectMapper = new ObjectMapper();
+        objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+
+        ObjectReader objectReader = objectMapper.reader();
+        JavaType javaType = objectReader.getTypeFactory()
+                .constructParametricType(GHGraphQLResponse.class, Object.class);
+
+        return objectReader.forType(javaType).readValue(json);
+    }
+
+}
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/1-user.json
new file mode 100644
index 000000000..76578d3e4
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/1-user.json
@@ -0,0 +1,36 @@
+{
+  "login": "seate",
+  "id": 86824703,
+  "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+  "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+  "gravatar_id": "",
+  "url": "https://api.github.com/users/seate",
+  "html_url": "https://github.com/seate",
+  "followers_url": "https://api.github.com/users/seate/followers",
+  "following_url": "https://api.github.com/users/seate/following{/other_user}",
+  "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+  "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+  "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+  "organizations_url": "https://api.github.com/users/seate/orgs",
+  "repos_url": "https://api.github.com/users/seate/repos",
+  "events_url": "https://api.github.com/users/seate/events{/privacy}",
+  "received_events_url": "https://api.github.com/users/seate/received_events",
+  "type": "User",
+  "user_view_type": "public",
+  "site_admin": false,
+  "name": "KIMSIWOO",
+  "company": "Inha university",
+  "blog": "",
+  "location": null,
+  "email": "sa20207@naver.com",
+  "hireable": null,
+  "bio": null,
+  "twitter_username": null,
+  "notification_email": "sa20207@naver.com",
+  "public_repos": 34,
+  "public_gists": 0,
+  "followers": 2,
+  "following": 2,
+  "created_at": "2021-07-02T07:40:16Z",
+  "updated_at": "2025-03-03T13:26:53Z"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/2-r_s_for-test.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/2-r_s_for-test.json
new file mode 100644
index 000000000..c2de0d78c
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/2-r_s_for-test.json
@@ -0,0 +1,139 @@
+{
+  "id": 933252913,
+  "node_id": "R_kgDON6BPMQ",
+  "name": "for-test",
+  "full_name": "seate/for-test",
+  "private": false,
+  "owner": {
+    "login": "seate",
+    "id": 86824703,
+    "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+    "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/seate",
+    "html_url": "https://github.com/seate",
+    "followers_url": "https://api.github.com/users/seate/followers",
+    "following_url": "https://api.github.com/users/seate/following{/other_user}",
+    "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+    "organizations_url": "https://api.github.com/users/seate/orgs",
+    "repos_url": "https://api.github.com/users/seate/repos",
+    "events_url": "https://api.github.com/users/seate/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/seate/received_events",
+    "type": "User",
+    "user_view_type": "public",
+    "site_admin": false
+  },
+  "html_url": "https://github.com/seate/for-test",
+  "description": "깃허브 테스트용 레포",
+  "fork": false,
+  "url": "https://api.github.com/repos/seate/for-test",
+  "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+  "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+  "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+  "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+  "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+  "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+  "events_url": "https://api.github.com/repos/seate/for-test/events",
+  "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+  "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+  "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+  "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+  "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+  "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+  "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+  "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+  "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+  "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+  "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+  "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+  "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+  "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+  "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+  "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+  "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+  "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+  "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+  "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+  "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+  "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+  "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+  "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+  "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+  "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+  "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+  "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+  "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+  "created_at": "2025-02-15T14:21:31Z",
+  "updated_at": "2025-03-15T16:06:51Z",
+  "pushed_at": "2025-03-15T16:17:01Z",
+  "git_url": "git://github.com/seate/for-test.git",
+  "ssh_url": "git@github.com:seate/for-test.git",
+  "clone_url": "https://github.com/seate/for-test.git",
+  "svn_url": "https://github.com/seate/for-test",
+  "homepage": null,
+  "size": 62,
+  "stargazers_count": 0,
+  "watchers_count": 0,
+  "language": null,
+  "has_issues": true,
+  "has_projects": true,
+  "has_downloads": true,
+  "has_wiki": true,
+  "has_pages": false,
+  "has_discussions": false,
+  "forks_count": 0,
+  "mirror_url": null,
+  "archived": false,
+  "disabled": false,
+  "open_issues_count": 3,
+  "license": null,
+  "allow_forking": true,
+  "is_template": false,
+  "web_commit_signoff_required": false,
+  "topics": [],
+  "visibility": "public",
+  "forks": 0,
+  "open_issues": 3,
+  "watchers": 0,
+  "default_branch": "develop",
+  "permissions": {
+    "admin": true,
+    "maintain": true,
+    "push": true,
+    "triage": true,
+    "pull": true
+  },
+  "temp_clone_token": "",
+  "allow_squash_merge": true,
+  "allow_merge_commit": true,
+  "allow_rebase_merge": true,
+  "allow_auto_merge": true,
+  "delete_branch_on_merge": false,
+  "allow_update_branch": false,
+  "use_squash_pr_title_as_default": false,
+  "squash_merge_commit_message": "COMMIT_MESSAGES",
+  "squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
+  "merge_commit_message": "PR_TITLE",
+  "merge_commit_title": "MERGE_MESSAGE",
+  "security_and_analysis": {
+    "secret_scanning": {
+      "status": "disabled"
+    },
+    "secret_scanning_push_protection": {
+      "status": "disabled"
+    },
+    "dependabot_security_updates": {
+      "status": "disabled"
+    },
+    "secret_scanning_non_provider_patterns": {
+      "status": "disabled"
+    },
+    "secret_scanning_validity_checks": {
+      "status": "disabled"
+    }
+  },
+  "network_count": 0,
+  "subscribers_count": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/3-r_s_f_pulls_9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/3-r_s_f_pulls_9.json
new file mode 100644
index 000000000..11347dec3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/3-r_s_f_pulls_9.json
@@ -0,0 +1,372 @@
+{
+  "url": "https://api.github.com/repos/seate/for-test/pulls/9",
+  "id": 2395455682,
+  "node_id": "PR_kwDON6BPMc6Ox8DC",
+  "html_url": "https://github.com/seate/for-test/pull/9",
+  "diff_url": "https://github.com/seate/for-test/pull/9.diff",
+  "patch_url": "https://github.com/seate/for-test/pull/9.patch",
+  "issue_url": "https://api.github.com/repos/seate/for-test/issues/9",
+  "number": 9,
+  "state": "open",
+  "locked": false,
+  "title": "github-api enable pull request auto merge test",
+  "user": {
+    "login": "seate",
+    "id": 86824703,
+    "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+    "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/seate",
+    "html_url": "https://github.com/seate",
+    "followers_url": "https://api.github.com/users/seate/followers",
+    "following_url": "https://api.github.com/users/seate/following{/other_user}",
+    "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+    "organizations_url": "https://api.github.com/users/seate/orgs",
+    "repos_url": "https://api.github.com/users/seate/repos",
+    "events_url": "https://api.github.com/users/seate/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/seate/received_events",
+    "type": "User",
+    "user_view_type": "public",
+    "site_admin": false
+  },
+  "body": "github-api enable pull request auto merge test",
+  "created_at": "2025-03-15T16:07:53Z",
+  "updated_at": "2025-03-15T16:18:20Z",
+  "closed_at": null,
+  "merged_at": null,
+  "merge_commit_sha": "25a5888073ee3d2a975e012492950dddb8c346dc",
+  "assignee": null,
+  "assignees": [],
+  "requested_reviewers": [],
+  "requested_teams": [],
+  "labels": [],
+  "milestone": null,
+  "draft": false,
+  "commits_url": "https://api.github.com/repos/seate/for-test/pulls/9/commits",
+  "review_comments_url": "https://api.github.com/repos/seate/for-test/pulls/9/comments",
+  "review_comment_url": "https://api.github.com/repos/seate/for-test/pulls/comments{/number}",
+  "comments_url": "https://api.github.com/repos/seate/for-test/issues/9/comments",
+  "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/4888b44d7204dd05680e90159af839c8b1194b6d",
+  "head": {
+    "label": "seate:test1",
+    "ref": "test1",
+    "sha": "4888b44d7204dd05680e90159af839c8b1194b6d",
+    "user": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "repo": {
+      "id": 933252913,
+      "node_id": "R_kgDON6BPMQ",
+      "name": "for-test",
+      "full_name": "seate/for-test",
+      "private": false,
+      "owner": {
+        "login": "seate",
+        "id": 86824703,
+        "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+        "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+        "gravatar_id": "",
+        "url": "https://api.github.com/users/seate",
+        "html_url": "https://github.com/seate",
+        "followers_url": "https://api.github.com/users/seate/followers",
+        "following_url": "https://api.github.com/users/seate/following{/other_user}",
+        "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+        "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+        "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+        "organizations_url": "https://api.github.com/users/seate/orgs",
+        "repos_url": "https://api.github.com/users/seate/repos",
+        "events_url": "https://api.github.com/users/seate/events{/privacy}",
+        "received_events_url": "https://api.github.com/users/seate/received_events",
+        "type": "User",
+        "user_view_type": "public",
+        "site_admin": false
+      },
+      "html_url": "https://github.com/seate/for-test",
+      "description": "깃허브 테스트용 레포",
+      "fork": false,
+      "url": "https://api.github.com/repos/seate/for-test",
+      "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+      "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+      "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+      "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+      "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+      "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+      "events_url": "https://api.github.com/repos/seate/for-test/events",
+      "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+      "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+      "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+      "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+      "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+      "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+      "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+      "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+      "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+      "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+      "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+      "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+      "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+      "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+      "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+      "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+      "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+      "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+      "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+      "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+      "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+      "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+      "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+      "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+      "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+      "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+      "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+      "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+      "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+      "created_at": "2025-02-15T14:21:31Z",
+      "updated_at": "2025-03-15T16:06:51Z",
+      "pushed_at": "2025-03-15T16:17:01Z",
+      "git_url": "git://github.com/seate/for-test.git",
+      "ssh_url": "git@github.com:seate/for-test.git",
+      "clone_url": "https://github.com/seate/for-test.git",
+      "svn_url": "https://github.com/seate/for-test",
+      "homepage": null,
+      "size": 62,
+      "stargazers_count": 0,
+      "watchers_count": 0,
+      "language": null,
+      "has_issues": true,
+      "has_projects": true,
+      "has_downloads": true,
+      "has_wiki": true,
+      "has_pages": false,
+      "has_discussions": false,
+      "forks_count": 0,
+      "mirror_url": null,
+      "archived": false,
+      "disabled": false,
+      "open_issues_count": 3,
+      "license": null,
+      "allow_forking": true,
+      "is_template": false,
+      "web_commit_signoff_required": false,
+      "topics": [],
+      "visibility": "public",
+      "forks": 0,
+      "open_issues": 3,
+      "watchers": 0,
+      "default_branch": "develop"
+    }
+  },
+  "base": {
+    "label": "seate:develop",
+    "ref": "develop",
+    "sha": "2bc9cde73b377e4d0ebda0d19f636644808388f5",
+    "user": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "repo": {
+      "id": 933252913,
+      "node_id": "R_kgDON6BPMQ",
+      "name": "for-test",
+      "full_name": "seate/for-test",
+      "private": false,
+      "owner": {
+        "login": "seate",
+        "id": 86824703,
+        "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+        "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+        "gravatar_id": "",
+        "url": "https://api.github.com/users/seate",
+        "html_url": "https://github.com/seate",
+        "followers_url": "https://api.github.com/users/seate/followers",
+        "following_url": "https://api.github.com/users/seate/following{/other_user}",
+        "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+        "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+        "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+        "organizations_url": "https://api.github.com/users/seate/orgs",
+        "repos_url": "https://api.github.com/users/seate/repos",
+        "events_url": "https://api.github.com/users/seate/events{/privacy}",
+        "received_events_url": "https://api.github.com/users/seate/received_events",
+        "type": "User",
+        "user_view_type": "public",
+        "site_admin": false
+      },
+      "html_url": "https://github.com/seate/for-test",
+      "description": "깃허브 테스트용 레포",
+      "fork": false,
+      "url": "https://api.github.com/repos/seate/for-test",
+      "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+      "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+      "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+      "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+      "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+      "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+      "events_url": "https://api.github.com/repos/seate/for-test/events",
+      "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+      "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+      "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+      "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+      "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+      "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+      "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+      "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+      "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+      "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+      "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+      "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+      "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+      "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+      "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+      "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+      "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+      "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+      "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+      "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+      "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+      "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+      "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+      "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+      "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+      "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+      "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+      "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+      "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+      "created_at": "2025-02-15T14:21:31Z",
+      "updated_at": "2025-03-15T16:06:51Z",
+      "pushed_at": "2025-03-15T16:17:01Z",
+      "git_url": "git://github.com/seate/for-test.git",
+      "ssh_url": "git@github.com:seate/for-test.git",
+      "clone_url": "https://github.com/seate/for-test.git",
+      "svn_url": "https://github.com/seate/for-test",
+      "homepage": null,
+      "size": 62,
+      "stargazers_count": 0,
+      "watchers_count": 0,
+      "language": null,
+      "has_issues": true,
+      "has_projects": true,
+      "has_downloads": true,
+      "has_wiki": true,
+      "has_pages": false,
+      "has_discussions": false,
+      "forks_count": 0,
+      "mirror_url": null,
+      "archived": false,
+      "disabled": false,
+      "open_issues_count": 3,
+      "license": null,
+      "allow_forking": true,
+      "is_template": false,
+      "web_commit_signoff_required": false,
+      "topics": [],
+      "visibility": "public",
+      "forks": 0,
+      "open_issues": 3,
+      "watchers": 0,
+      "default_branch": "develop"
+    }
+  },
+  "_links": {
+    "self": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9"
+    },
+    "html": {
+      "href": "https://github.com/seate/for-test/pull/9"
+    },
+    "issue": {
+      "href": "https://api.github.com/repos/seate/for-test/issues/9"
+    },
+    "comments": {
+      "href": "https://api.github.com/repos/seate/for-test/issues/9/comments"
+    },
+    "review_comments": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9/comments"
+    },
+    "review_comment": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/comments{/number}"
+    },
+    "commits": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9/commits"
+    },
+    "statuses": {
+      "href": "https://api.github.com/repos/seate/for-test/statuses/4888b44d7204dd05680e90159af839c8b1194b6d"
+    }
+  },
+  "author_association": "OWNER",
+  "auto_merge": {
+    "enabled_by": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "merge_method": "merge",
+    "commit_title": "This is commit title.",
+    "commit_message": "This is commit body."
+  },
+  "active_lock_reason": null,
+  "merged": false,
+  "mergeable": true,
+  "rebaseable": true,
+  "mergeable_state": "blocked",
+  "merged_by": null,
+  "comments": 1,
+  "review_comments": 0,
+  "maintainer_can_modify": false,
+  "commits": 16,
+  "additions": 642,
+  "deletions": 0,
+  "changed_files": 19
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/6-r_s_f_pulls_9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/6-r_s_f_pulls_9.json
new file mode 100644
index 000000000..11347dec3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/6-r_s_f_pulls_9.json
@@ -0,0 +1,372 @@
+{
+  "url": "https://api.github.com/repos/seate/for-test/pulls/9",
+  "id": 2395455682,
+  "node_id": "PR_kwDON6BPMc6Ox8DC",
+  "html_url": "https://github.com/seate/for-test/pull/9",
+  "diff_url": "https://github.com/seate/for-test/pull/9.diff",
+  "patch_url": "https://github.com/seate/for-test/pull/9.patch",
+  "issue_url": "https://api.github.com/repos/seate/for-test/issues/9",
+  "number": 9,
+  "state": "open",
+  "locked": false,
+  "title": "github-api enable pull request auto merge test",
+  "user": {
+    "login": "seate",
+    "id": 86824703,
+    "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+    "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/seate",
+    "html_url": "https://github.com/seate",
+    "followers_url": "https://api.github.com/users/seate/followers",
+    "following_url": "https://api.github.com/users/seate/following{/other_user}",
+    "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+    "organizations_url": "https://api.github.com/users/seate/orgs",
+    "repos_url": "https://api.github.com/users/seate/repos",
+    "events_url": "https://api.github.com/users/seate/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/seate/received_events",
+    "type": "User",
+    "user_view_type": "public",
+    "site_admin": false
+  },
+  "body": "github-api enable pull request auto merge test",
+  "created_at": "2025-03-15T16:07:53Z",
+  "updated_at": "2025-03-15T16:18:20Z",
+  "closed_at": null,
+  "merged_at": null,
+  "merge_commit_sha": "25a5888073ee3d2a975e012492950dddb8c346dc",
+  "assignee": null,
+  "assignees": [],
+  "requested_reviewers": [],
+  "requested_teams": [],
+  "labels": [],
+  "milestone": null,
+  "draft": false,
+  "commits_url": "https://api.github.com/repos/seate/for-test/pulls/9/commits",
+  "review_comments_url": "https://api.github.com/repos/seate/for-test/pulls/9/comments",
+  "review_comment_url": "https://api.github.com/repos/seate/for-test/pulls/comments{/number}",
+  "comments_url": "https://api.github.com/repos/seate/for-test/issues/9/comments",
+  "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/4888b44d7204dd05680e90159af839c8b1194b6d",
+  "head": {
+    "label": "seate:test1",
+    "ref": "test1",
+    "sha": "4888b44d7204dd05680e90159af839c8b1194b6d",
+    "user": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "repo": {
+      "id": 933252913,
+      "node_id": "R_kgDON6BPMQ",
+      "name": "for-test",
+      "full_name": "seate/for-test",
+      "private": false,
+      "owner": {
+        "login": "seate",
+        "id": 86824703,
+        "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+        "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+        "gravatar_id": "",
+        "url": "https://api.github.com/users/seate",
+        "html_url": "https://github.com/seate",
+        "followers_url": "https://api.github.com/users/seate/followers",
+        "following_url": "https://api.github.com/users/seate/following{/other_user}",
+        "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+        "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+        "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+        "organizations_url": "https://api.github.com/users/seate/orgs",
+        "repos_url": "https://api.github.com/users/seate/repos",
+        "events_url": "https://api.github.com/users/seate/events{/privacy}",
+        "received_events_url": "https://api.github.com/users/seate/received_events",
+        "type": "User",
+        "user_view_type": "public",
+        "site_admin": false
+      },
+      "html_url": "https://github.com/seate/for-test",
+      "description": "깃허브 테스트용 레포",
+      "fork": false,
+      "url": "https://api.github.com/repos/seate/for-test",
+      "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+      "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+      "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+      "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+      "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+      "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+      "events_url": "https://api.github.com/repos/seate/for-test/events",
+      "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+      "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+      "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+      "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+      "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+      "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+      "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+      "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+      "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+      "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+      "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+      "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+      "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+      "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+      "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+      "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+      "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+      "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+      "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+      "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+      "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+      "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+      "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+      "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+      "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+      "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+      "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+      "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+      "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+      "created_at": "2025-02-15T14:21:31Z",
+      "updated_at": "2025-03-15T16:06:51Z",
+      "pushed_at": "2025-03-15T16:17:01Z",
+      "git_url": "git://github.com/seate/for-test.git",
+      "ssh_url": "git@github.com:seate/for-test.git",
+      "clone_url": "https://github.com/seate/for-test.git",
+      "svn_url": "https://github.com/seate/for-test",
+      "homepage": null,
+      "size": 62,
+      "stargazers_count": 0,
+      "watchers_count": 0,
+      "language": null,
+      "has_issues": true,
+      "has_projects": true,
+      "has_downloads": true,
+      "has_wiki": true,
+      "has_pages": false,
+      "has_discussions": false,
+      "forks_count": 0,
+      "mirror_url": null,
+      "archived": false,
+      "disabled": false,
+      "open_issues_count": 3,
+      "license": null,
+      "allow_forking": true,
+      "is_template": false,
+      "web_commit_signoff_required": false,
+      "topics": [],
+      "visibility": "public",
+      "forks": 0,
+      "open_issues": 3,
+      "watchers": 0,
+      "default_branch": "develop"
+    }
+  },
+  "base": {
+    "label": "seate:develop",
+    "ref": "develop",
+    "sha": "2bc9cde73b377e4d0ebda0d19f636644808388f5",
+    "user": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "repo": {
+      "id": 933252913,
+      "node_id": "R_kgDON6BPMQ",
+      "name": "for-test",
+      "full_name": "seate/for-test",
+      "private": false,
+      "owner": {
+        "login": "seate",
+        "id": 86824703,
+        "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+        "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+        "gravatar_id": "",
+        "url": "https://api.github.com/users/seate",
+        "html_url": "https://github.com/seate",
+        "followers_url": "https://api.github.com/users/seate/followers",
+        "following_url": "https://api.github.com/users/seate/following{/other_user}",
+        "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+        "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+        "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+        "organizations_url": "https://api.github.com/users/seate/orgs",
+        "repos_url": "https://api.github.com/users/seate/repos",
+        "events_url": "https://api.github.com/users/seate/events{/privacy}",
+        "received_events_url": "https://api.github.com/users/seate/received_events",
+        "type": "User",
+        "user_view_type": "public",
+        "site_admin": false
+      },
+      "html_url": "https://github.com/seate/for-test",
+      "description": "깃허브 테스트용 레포",
+      "fork": false,
+      "url": "https://api.github.com/repos/seate/for-test",
+      "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+      "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+      "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+      "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+      "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+      "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+      "events_url": "https://api.github.com/repos/seate/for-test/events",
+      "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+      "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+      "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+      "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+      "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+      "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+      "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+      "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+      "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+      "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+      "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+      "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+      "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+      "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+      "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+      "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+      "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+      "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+      "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+      "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+      "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+      "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+      "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+      "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+      "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+      "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+      "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+      "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+      "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+      "created_at": "2025-02-15T14:21:31Z",
+      "updated_at": "2025-03-15T16:06:51Z",
+      "pushed_at": "2025-03-15T16:17:01Z",
+      "git_url": "git://github.com/seate/for-test.git",
+      "ssh_url": "git@github.com:seate/for-test.git",
+      "clone_url": "https://github.com/seate/for-test.git",
+      "svn_url": "https://github.com/seate/for-test",
+      "homepage": null,
+      "size": 62,
+      "stargazers_count": 0,
+      "watchers_count": 0,
+      "language": null,
+      "has_issues": true,
+      "has_projects": true,
+      "has_downloads": true,
+      "has_wiki": true,
+      "has_pages": false,
+      "has_discussions": false,
+      "forks_count": 0,
+      "mirror_url": null,
+      "archived": false,
+      "disabled": false,
+      "open_issues_count": 3,
+      "license": null,
+      "allow_forking": true,
+      "is_template": false,
+      "web_commit_signoff_required": false,
+      "topics": [],
+      "visibility": "public",
+      "forks": 0,
+      "open_issues": 3,
+      "watchers": 0,
+      "default_branch": "develop"
+    }
+  },
+  "_links": {
+    "self": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9"
+    },
+    "html": {
+      "href": "https://github.com/seate/for-test/pull/9"
+    },
+    "issue": {
+      "href": "https://api.github.com/repos/seate/for-test/issues/9"
+    },
+    "comments": {
+      "href": "https://api.github.com/repos/seate/for-test/issues/9/comments"
+    },
+    "review_comments": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9/comments"
+    },
+    "review_comment": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/comments{/number}"
+    },
+    "commits": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9/commits"
+    },
+    "statuses": {
+      "href": "https://api.github.com/repos/seate/for-test/statuses/4888b44d7204dd05680e90159af839c8b1194b6d"
+    }
+  },
+  "author_association": "OWNER",
+  "auto_merge": {
+    "enabled_by": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "merge_method": "merge",
+    "commit_title": "This is commit title.",
+    "commit_message": "This is commit body."
+  },
+  "active_lock_reason": null,
+  "merged": false,
+  "mergeable": true,
+  "rebaseable": true,
+  "mergeable_state": "blocked",
+  "merged_by": null,
+  "comments": 1,
+  "review_comments": 0,
+  "maintainer_can_modify": false,
+  "commits": 16,
+  "additions": 642,
+  "deletions": 0,
+  "changed_files": 19
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/7-users_seate.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/7-users_seate.json
new file mode 100644
index 000000000..ae11f2359
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/__files/7-users_seate.json
@@ -0,0 +1,35 @@
+{
+  "login": "seate",
+  "id": 86824703,
+  "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+  "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+  "gravatar_id": "",
+  "url": "https://api.github.com/users/seate",
+  "html_url": "https://github.com/seate",
+  "followers_url": "https://api.github.com/users/seate/followers",
+  "following_url": "https://api.github.com/users/seate/following{/other_user}",
+  "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+  "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+  "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+  "organizations_url": "https://api.github.com/users/seate/orgs",
+  "repos_url": "https://api.github.com/users/seate/repos",
+  "events_url": "https://api.github.com/users/seate/events{/privacy}",
+  "received_events_url": "https://api.github.com/users/seate/received_events",
+  "type": "User",
+  "user_view_type": "public",
+  "site_admin": false,
+  "name": "KIMSIWOO",
+  "company": "Inha university",
+  "blog": "",
+  "location": null,
+  "email": "sa20207@naver.com",
+  "hireable": null,
+  "bio": null,
+  "twitter_username": null,
+  "public_repos": 34,
+  "public_gists": 0,
+  "followers": 2,
+  "following": 2,
+  "created_at": "2021-07-02T07:40:16Z",
+  "updated_at": "2025-03-03T13:26:53Z"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/1-user.json
new file mode 100644
index 000000000..4b252141e
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/1-user.json
@@ -0,0 +1,47 @@
+{
+  "id": "08dbdf10-b416-4ff3-b2f8-3985f3f99bb9",
+  "name": "user",
+  "request": {
+    "url": "/user",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "1-user.json",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:24 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"91439c9cd22b1066c90ef899df4f995dcda9ed34b86d5e107b7c311aaaff2136\"",
+      "Last-Modified": "Mon, 03 Mar 2025 13:26:53 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4989",
+      "X-RateLimit-Reset": "1742065904",
+      "X-RateLimit-Used": "11",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F688:2B46D8:3A9875:59C85D:67D5C344"
+    }
+  },
+  "uuid": "08dbdf10-b416-4ff3-b2f8-3985f3f99bb9",
+  "persistent": true,
+  "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/2-r_s_for-test.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/2-r_s_for-test.json
new file mode 100644
index 000000000..6fcd708ed
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/2-r_s_for-test.json
@@ -0,0 +1,47 @@
+{
+  "id": "efe9930f-f284-49cb-ac98-1870d22d0454",
+  "name": "repos_seate_for-test",
+  "request": {
+    "url": "/repos/seate/for-test",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "2-r_s_for-test.json",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:27 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"9181d2d37a58759c6739fb93cdf26cbc7b9cc04f34e87456932f65921cb5473d\"",
+      "Last-Modified": "Sat, 15 Mar 2025 16:06:51 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4984",
+      "X-RateLimit-Reset": "1742065904",
+      "X-RateLimit-Used": "16",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F68A:165A85:3BCFDE:5B22D9:67D5C347"
+    }
+  },
+  "uuid": "efe9930f-f284-49cb-ac98-1870d22d0454",
+  "persistent": true,
+  "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/3-r_s_f_pulls_9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/3-r_s_f_pulls_9.json
new file mode 100644
index 000000000..f3a8eab80
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/3-r_s_f_pulls_9.json
@@ -0,0 +1,50 @@
+{
+  "id": "4b26d080-5f51-45ea-90b9-dfbe0751cdb5",
+  "name": "repos_seate_for-test_pulls_9",
+  "request": {
+    "url": "/repos/seate/for-test/pulls/9",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "3-r_s_f_pulls_9.json",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:27 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"4cb91abd4bd5effc3228763b88c5abec155f063e483efaa6ba284bb351e27687\"",
+      "Last-Modified": "Sat, 15 Mar 2025 16:18:20 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4983",
+      "X-RateLimit-Reset": "1742065904",
+      "X-RateLimit-Used": "17",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F68B:15724C:3AAF79:5A026E:67D5C347"
+    }
+  },
+  "uuid": "4b26d080-5f51-45ea-90b9-dfbe0751cdb5",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-seate-for-test-pulls-9",
+  "requiredScenarioState": "Started",
+  "newScenarioState": "scenario-1-repos-seate-for-test-pulls-9-2",
+  "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/4-graphql.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/4-graphql.json
new file mode 100644
index 000000000..42db1e78b
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/4-graphql.json
@@ -0,0 +1,50 @@
+{
+  "id": "89c6825e-6277-4ad0-a9f0-d0cb70e5a15b",
+  "name": "graphql",
+  "request": {
+    "url": "/graphql",
+    "method": "POST",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    },
+    "bodyPatterns": [
+      {
+        "equalToJson": "{\"query\":\"query GetPullRequestID { repository(name: \\\"for-test\\\", owner: \\\"seate\\\") { pullRequest(number: 9) { id } } }\"}",
+        "ignoreArrayOrder": true,
+        "ignoreExtraElements": false
+      }
+    ]
+  },
+  "response": {
+    "status": 200,
+    "body": "{\"data\":{\"repository\":{\"pullRequest\":{\"id\":\"PR_kwDON6BPMc6Ox8DC\"}}}}",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:28 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v4; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4981",
+      "X-RateLimit-Reset": "1742063501",
+      "X-RateLimit-Used": "19",
+      "X-RateLimit-Resource": "graphql",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Vary": "Accept-Encoding, Accept, X-Requested-With",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F68C:2403B3:120286:1B2D2F:67D5C348"
+    }
+  },
+  "uuid": "89c6825e-6277-4ad0-a9f0-d0cb70e5a15b",
+  "persistent": true,
+  "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/5-graphql.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/5-graphql.json
new file mode 100644
index 000000000..7aff47b1c
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/5-graphql.json
@@ -0,0 +1,50 @@
+{
+  "id": "ff9bdb46-fb2a-44c2-a164-9a790e11c26c",
+  "name": "graphql",
+  "request": {
+    "url": "/graphql",
+    "method": "POST",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    },
+    "bodyPatterns": [
+      {
+        "equalToJson": "{\"query\":\"mutation EnableAutoMerge { enablePullRequestAutoMerge(input: { pullRequestId: \\\"PR_kwDON6BPMc6Ox8DC\\\" authorEmail: \\\"sa20207@naver.com\\\" clientMutationId: \\\"github-api\\\" commitBody: \\\"This is commit body.\\\" commitHeadline: \\\"This is commit title.\\\" expectedHeadOid: \\\"4888b44d7204dd05680e90159af839c8b1194b6d\\\" mergeMethod: MERGE}) { pullRequest { id } } }\"}",
+        "ignoreArrayOrder": true,
+        "ignoreExtraElements": false
+      }
+    ]
+  },
+  "response": {
+    "status": 200,
+    "body": "{\"data\":{\"enablePullRequestAutoMerge\":{\"pullRequest\":{\"id\":\"PR_kwDON6BPMc6Ox8DC\"}}}}",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:28 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v4; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4980",
+      "X-RateLimit-Reset": "1742063501",
+      "X-RateLimit-Used": "20",
+      "X-RateLimit-Resource": "graphql",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Vary": "Accept-Encoding, Accept, X-Requested-With",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F68D:4F3EE:3B15C8:5A6881:67D5C348"
+    }
+  },
+  "uuid": "ff9bdb46-fb2a-44c2-a164-9a790e11c26c",
+  "persistent": true,
+  "insertionIndex": 5
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/6-r_s_f_pulls_9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/6-r_s_f_pulls_9.json
new file mode 100644
index 000000000..f25e8a33f
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/6-r_s_f_pulls_9.json
@@ -0,0 +1,49 @@
+{
+  "id": "0dd48f53-a8fb-4df8-ba9e-946146f68a33",
+  "name": "repos_seate_for-test_pulls_9",
+  "request": {
+    "url": "/repos/seate/for-test/pulls/9",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "6-r_s_f_pulls_9.json",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:29 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"4cb91abd4bd5effc3228763b88c5abec155f063e483efaa6ba284bb351e27687\"",
+      "Last-Modified": "Sat, 15 Mar 2025 16:18:20 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4982",
+      "X-RateLimit-Reset": "1742065904",
+      "X-RateLimit-Used": "18",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F68E:7ED0E:3A2A32:597D10:67D5C348"
+    }
+  },
+  "uuid": "0dd48f53-a8fb-4df8-ba9e-946146f68a33",
+  "persistent": true,
+  "scenarioName": "scenario-1-repos-seate-for-test-pulls-9",
+  "requiredScenarioState": "scenario-1-repos-seate-for-test-pulls-9-2",
+  "insertionIndex": 6
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/7-users_seate.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/7-users_seate.json
new file mode 100644
index 000000000..51c6c8da1
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMerge/mappings/7-users_seate.json
@@ -0,0 +1,47 @@
+{
+  "id": "90286178-d879-4d06-ac33-48c714b16fc2",
+  "name": "users_seate",
+  "request": {
+    "url": "/users/seate",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "7-users_seate.json",
+    "headers": {
+      "Date": "Sat, 15 Mar 2025 18:13:29 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"0e08109bbc9b14a5d7838fffe7e57d5025e9ee8825089eb2c05f3681b890cbf4\"",
+      "Last-Modified": "Mon, 03 Mar 2025 13:26:53 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4981",
+      "X-RateLimit-Reset": "1742065904",
+      "X-RateLimit-Used": "19",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "F68F:124DB4:3CBA1A:5C0D00:67D5C349"
+    }
+  },
+  "uuid": "90286178-d879-4d06-ac33-48c714b16fc2",
+  "persistent": true,
+  "insertionIndex": 7
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/1-user.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/1-user.json
new file mode 100644
index 000000000..76578d3e4
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/1-user.json
@@ -0,0 +1,36 @@
+{
+  "login": "seate",
+  "id": 86824703,
+  "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+  "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+  "gravatar_id": "",
+  "url": "https://api.github.com/users/seate",
+  "html_url": "https://github.com/seate",
+  "followers_url": "https://api.github.com/users/seate/followers",
+  "following_url": "https://api.github.com/users/seate/following{/other_user}",
+  "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+  "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+  "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+  "organizations_url": "https://api.github.com/users/seate/orgs",
+  "repos_url": "https://api.github.com/users/seate/repos",
+  "events_url": "https://api.github.com/users/seate/events{/privacy}",
+  "received_events_url": "https://api.github.com/users/seate/received_events",
+  "type": "User",
+  "user_view_type": "public",
+  "site_admin": false,
+  "name": "KIMSIWOO",
+  "company": "Inha university",
+  "blog": "",
+  "location": null,
+  "email": "sa20207@naver.com",
+  "hireable": null,
+  "bio": null,
+  "twitter_username": null,
+  "notification_email": "sa20207@naver.com",
+  "public_repos": 34,
+  "public_gists": 0,
+  "followers": 2,
+  "following": 2,
+  "created_at": "2021-07-02T07:40:16Z",
+  "updated_at": "2025-03-03T13:26:53Z"
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/2-r_s_for-test.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/2-r_s_for-test.json
new file mode 100644
index 000000000..c2de0d78c
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/2-r_s_for-test.json
@@ -0,0 +1,139 @@
+{
+  "id": 933252913,
+  "node_id": "R_kgDON6BPMQ",
+  "name": "for-test",
+  "full_name": "seate/for-test",
+  "private": false,
+  "owner": {
+    "login": "seate",
+    "id": 86824703,
+    "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+    "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/seate",
+    "html_url": "https://github.com/seate",
+    "followers_url": "https://api.github.com/users/seate/followers",
+    "following_url": "https://api.github.com/users/seate/following{/other_user}",
+    "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+    "organizations_url": "https://api.github.com/users/seate/orgs",
+    "repos_url": "https://api.github.com/users/seate/repos",
+    "events_url": "https://api.github.com/users/seate/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/seate/received_events",
+    "type": "User",
+    "user_view_type": "public",
+    "site_admin": false
+  },
+  "html_url": "https://github.com/seate/for-test",
+  "description": "깃허브 테스트용 레포",
+  "fork": false,
+  "url": "https://api.github.com/repos/seate/for-test",
+  "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+  "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+  "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+  "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+  "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+  "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+  "events_url": "https://api.github.com/repos/seate/for-test/events",
+  "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+  "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+  "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+  "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+  "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+  "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+  "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+  "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+  "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+  "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+  "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+  "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+  "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+  "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+  "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+  "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+  "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+  "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+  "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+  "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+  "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+  "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+  "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+  "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+  "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+  "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+  "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+  "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+  "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+  "created_at": "2025-02-15T14:21:31Z",
+  "updated_at": "2025-03-15T16:06:51Z",
+  "pushed_at": "2025-03-15T16:17:01Z",
+  "git_url": "git://github.com/seate/for-test.git",
+  "ssh_url": "git@github.com:seate/for-test.git",
+  "clone_url": "https://github.com/seate/for-test.git",
+  "svn_url": "https://github.com/seate/for-test",
+  "homepage": null,
+  "size": 62,
+  "stargazers_count": 0,
+  "watchers_count": 0,
+  "language": null,
+  "has_issues": true,
+  "has_projects": true,
+  "has_downloads": true,
+  "has_wiki": true,
+  "has_pages": false,
+  "has_discussions": false,
+  "forks_count": 0,
+  "mirror_url": null,
+  "archived": false,
+  "disabled": false,
+  "open_issues_count": 3,
+  "license": null,
+  "allow_forking": true,
+  "is_template": false,
+  "web_commit_signoff_required": false,
+  "topics": [],
+  "visibility": "public",
+  "forks": 0,
+  "open_issues": 3,
+  "watchers": 0,
+  "default_branch": "develop",
+  "permissions": {
+    "admin": true,
+    "maintain": true,
+    "push": true,
+    "triage": true,
+    "pull": true
+  },
+  "temp_clone_token": "",
+  "allow_squash_merge": true,
+  "allow_merge_commit": true,
+  "allow_rebase_merge": true,
+  "allow_auto_merge": true,
+  "delete_branch_on_merge": false,
+  "allow_update_branch": false,
+  "use_squash_pr_title_as_default": false,
+  "squash_merge_commit_message": "COMMIT_MESSAGES",
+  "squash_merge_commit_title": "COMMIT_OR_PR_TITLE",
+  "merge_commit_message": "PR_TITLE",
+  "merge_commit_title": "MERGE_MESSAGE",
+  "security_and_analysis": {
+    "secret_scanning": {
+      "status": "disabled"
+    },
+    "secret_scanning_push_protection": {
+      "status": "disabled"
+    },
+    "dependabot_security_updates": {
+      "status": "disabled"
+    },
+    "secret_scanning_non_provider_patterns": {
+      "status": "disabled"
+    },
+    "secret_scanning_validity_checks": {
+      "status": "disabled"
+    }
+  },
+  "network_count": 0,
+  "subscribers_count": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/3-r_s_f_pulls_9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/3-r_s_f_pulls_9.json
new file mode 100644
index 000000000..11347dec3
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/__files/3-r_s_f_pulls_9.json
@@ -0,0 +1,372 @@
+{
+  "url": "https://api.github.com/repos/seate/for-test/pulls/9",
+  "id": 2395455682,
+  "node_id": "PR_kwDON6BPMc6Ox8DC",
+  "html_url": "https://github.com/seate/for-test/pull/9",
+  "diff_url": "https://github.com/seate/for-test/pull/9.diff",
+  "patch_url": "https://github.com/seate/for-test/pull/9.patch",
+  "issue_url": "https://api.github.com/repos/seate/for-test/issues/9",
+  "number": 9,
+  "state": "open",
+  "locked": false,
+  "title": "github-api enable pull request auto merge test",
+  "user": {
+    "login": "seate",
+    "id": 86824703,
+    "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+    "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+    "gravatar_id": "",
+    "url": "https://api.github.com/users/seate",
+    "html_url": "https://github.com/seate",
+    "followers_url": "https://api.github.com/users/seate/followers",
+    "following_url": "https://api.github.com/users/seate/following{/other_user}",
+    "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+    "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+    "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+    "organizations_url": "https://api.github.com/users/seate/orgs",
+    "repos_url": "https://api.github.com/users/seate/repos",
+    "events_url": "https://api.github.com/users/seate/events{/privacy}",
+    "received_events_url": "https://api.github.com/users/seate/received_events",
+    "type": "User",
+    "user_view_type": "public",
+    "site_admin": false
+  },
+  "body": "github-api enable pull request auto merge test",
+  "created_at": "2025-03-15T16:07:53Z",
+  "updated_at": "2025-03-15T16:18:20Z",
+  "closed_at": null,
+  "merged_at": null,
+  "merge_commit_sha": "25a5888073ee3d2a975e012492950dddb8c346dc",
+  "assignee": null,
+  "assignees": [],
+  "requested_reviewers": [],
+  "requested_teams": [],
+  "labels": [],
+  "milestone": null,
+  "draft": false,
+  "commits_url": "https://api.github.com/repos/seate/for-test/pulls/9/commits",
+  "review_comments_url": "https://api.github.com/repos/seate/for-test/pulls/9/comments",
+  "review_comment_url": "https://api.github.com/repos/seate/for-test/pulls/comments{/number}",
+  "comments_url": "https://api.github.com/repos/seate/for-test/issues/9/comments",
+  "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/4888b44d7204dd05680e90159af839c8b1194b6d",
+  "head": {
+    "label": "seate:test1",
+    "ref": "test1",
+    "sha": "4888b44d7204dd05680e90159af839c8b1194b6d",
+    "user": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "repo": {
+      "id": 933252913,
+      "node_id": "R_kgDON6BPMQ",
+      "name": "for-test",
+      "full_name": "seate/for-test",
+      "private": false,
+      "owner": {
+        "login": "seate",
+        "id": 86824703,
+        "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+        "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+        "gravatar_id": "",
+        "url": "https://api.github.com/users/seate",
+        "html_url": "https://github.com/seate",
+        "followers_url": "https://api.github.com/users/seate/followers",
+        "following_url": "https://api.github.com/users/seate/following{/other_user}",
+        "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+        "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+        "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+        "organizations_url": "https://api.github.com/users/seate/orgs",
+        "repos_url": "https://api.github.com/users/seate/repos",
+        "events_url": "https://api.github.com/users/seate/events{/privacy}",
+        "received_events_url": "https://api.github.com/users/seate/received_events",
+        "type": "User",
+        "user_view_type": "public",
+        "site_admin": false
+      },
+      "html_url": "https://github.com/seate/for-test",
+      "description": "깃허브 테스트용 레포",
+      "fork": false,
+      "url": "https://api.github.com/repos/seate/for-test",
+      "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+      "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+      "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+      "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+      "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+      "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+      "events_url": "https://api.github.com/repos/seate/for-test/events",
+      "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+      "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+      "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+      "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+      "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+      "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+      "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+      "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+      "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+      "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+      "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+      "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+      "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+      "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+      "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+      "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+      "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+      "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+      "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+      "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+      "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+      "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+      "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+      "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+      "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+      "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+      "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+      "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+      "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+      "created_at": "2025-02-15T14:21:31Z",
+      "updated_at": "2025-03-15T16:06:51Z",
+      "pushed_at": "2025-03-15T16:17:01Z",
+      "git_url": "git://github.com/seate/for-test.git",
+      "ssh_url": "git@github.com:seate/for-test.git",
+      "clone_url": "https://github.com/seate/for-test.git",
+      "svn_url": "https://github.com/seate/for-test",
+      "homepage": null,
+      "size": 62,
+      "stargazers_count": 0,
+      "watchers_count": 0,
+      "language": null,
+      "has_issues": true,
+      "has_projects": true,
+      "has_downloads": true,
+      "has_wiki": true,
+      "has_pages": false,
+      "has_discussions": false,
+      "forks_count": 0,
+      "mirror_url": null,
+      "archived": false,
+      "disabled": false,
+      "open_issues_count": 3,
+      "license": null,
+      "allow_forking": true,
+      "is_template": false,
+      "web_commit_signoff_required": false,
+      "topics": [],
+      "visibility": "public",
+      "forks": 0,
+      "open_issues": 3,
+      "watchers": 0,
+      "default_branch": "develop"
+    }
+  },
+  "base": {
+    "label": "seate:develop",
+    "ref": "develop",
+    "sha": "2bc9cde73b377e4d0ebda0d19f636644808388f5",
+    "user": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "repo": {
+      "id": 933252913,
+      "node_id": "R_kgDON6BPMQ",
+      "name": "for-test",
+      "full_name": "seate/for-test",
+      "private": false,
+      "owner": {
+        "login": "seate",
+        "id": 86824703,
+        "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+        "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+        "gravatar_id": "",
+        "url": "https://api.github.com/users/seate",
+        "html_url": "https://github.com/seate",
+        "followers_url": "https://api.github.com/users/seate/followers",
+        "following_url": "https://api.github.com/users/seate/following{/other_user}",
+        "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+        "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+        "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+        "organizations_url": "https://api.github.com/users/seate/orgs",
+        "repos_url": "https://api.github.com/users/seate/repos",
+        "events_url": "https://api.github.com/users/seate/events{/privacy}",
+        "received_events_url": "https://api.github.com/users/seate/received_events",
+        "type": "User",
+        "user_view_type": "public",
+        "site_admin": false
+      },
+      "html_url": "https://github.com/seate/for-test",
+      "description": "깃허브 테스트용 레포",
+      "fork": false,
+      "url": "https://api.github.com/repos/seate/for-test",
+      "forks_url": "https://api.github.com/repos/seate/for-test/forks",
+      "keys_url": "https://api.github.com/repos/seate/for-test/keys{/key_id}",
+      "collaborators_url": "https://api.github.com/repos/seate/for-test/collaborators{/collaborator}",
+      "teams_url": "https://api.github.com/repos/seate/for-test/teams",
+      "hooks_url": "https://api.github.com/repos/seate/for-test/hooks",
+      "issue_events_url": "https://api.github.com/repos/seate/for-test/issues/events{/number}",
+      "events_url": "https://api.github.com/repos/seate/for-test/events",
+      "assignees_url": "https://api.github.com/repos/seate/for-test/assignees{/user}",
+      "branches_url": "https://api.github.com/repos/seate/for-test/branches{/branch}",
+      "tags_url": "https://api.github.com/repos/seate/for-test/tags",
+      "blobs_url": "https://api.github.com/repos/seate/for-test/git/blobs{/sha}",
+      "git_tags_url": "https://api.github.com/repos/seate/for-test/git/tags{/sha}",
+      "git_refs_url": "https://api.github.com/repos/seate/for-test/git/refs{/sha}",
+      "trees_url": "https://api.github.com/repos/seate/for-test/git/trees{/sha}",
+      "statuses_url": "https://api.github.com/repos/seate/for-test/statuses/{sha}",
+      "languages_url": "https://api.github.com/repos/seate/for-test/languages",
+      "stargazers_url": "https://api.github.com/repos/seate/for-test/stargazers",
+      "contributors_url": "https://api.github.com/repos/seate/for-test/contributors",
+      "subscribers_url": "https://api.github.com/repos/seate/for-test/subscribers",
+      "subscription_url": "https://api.github.com/repos/seate/for-test/subscription",
+      "commits_url": "https://api.github.com/repos/seate/for-test/commits{/sha}",
+      "git_commits_url": "https://api.github.com/repos/seate/for-test/git/commits{/sha}",
+      "comments_url": "https://api.github.com/repos/seate/for-test/comments{/number}",
+      "issue_comment_url": "https://api.github.com/repos/seate/for-test/issues/comments{/number}",
+      "contents_url": "https://api.github.com/repos/seate/for-test/contents/{+path}",
+      "compare_url": "https://api.github.com/repos/seate/for-test/compare/{base}...{head}",
+      "merges_url": "https://api.github.com/repos/seate/for-test/merges",
+      "archive_url": "https://api.github.com/repos/seate/for-test/{archive_format}{/ref}",
+      "downloads_url": "https://api.github.com/repos/seate/for-test/downloads",
+      "issues_url": "https://api.github.com/repos/seate/for-test/issues{/number}",
+      "pulls_url": "https://api.github.com/repos/seate/for-test/pulls{/number}",
+      "milestones_url": "https://api.github.com/repos/seate/for-test/milestones{/number}",
+      "notifications_url": "https://api.github.com/repos/seate/for-test/notifications{?since,all,participating}",
+      "labels_url": "https://api.github.com/repos/seate/for-test/labels{/name}",
+      "releases_url": "https://api.github.com/repos/seate/for-test/releases{/id}",
+      "deployments_url": "https://api.github.com/repos/seate/for-test/deployments",
+      "created_at": "2025-02-15T14:21:31Z",
+      "updated_at": "2025-03-15T16:06:51Z",
+      "pushed_at": "2025-03-15T16:17:01Z",
+      "git_url": "git://github.com/seate/for-test.git",
+      "ssh_url": "git@github.com:seate/for-test.git",
+      "clone_url": "https://github.com/seate/for-test.git",
+      "svn_url": "https://github.com/seate/for-test",
+      "homepage": null,
+      "size": 62,
+      "stargazers_count": 0,
+      "watchers_count": 0,
+      "language": null,
+      "has_issues": true,
+      "has_projects": true,
+      "has_downloads": true,
+      "has_wiki": true,
+      "has_pages": false,
+      "has_discussions": false,
+      "forks_count": 0,
+      "mirror_url": null,
+      "archived": false,
+      "disabled": false,
+      "open_issues_count": 3,
+      "license": null,
+      "allow_forking": true,
+      "is_template": false,
+      "web_commit_signoff_required": false,
+      "topics": [],
+      "visibility": "public",
+      "forks": 0,
+      "open_issues": 3,
+      "watchers": 0,
+      "default_branch": "develop"
+    }
+  },
+  "_links": {
+    "self": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9"
+    },
+    "html": {
+      "href": "https://github.com/seate/for-test/pull/9"
+    },
+    "issue": {
+      "href": "https://api.github.com/repos/seate/for-test/issues/9"
+    },
+    "comments": {
+      "href": "https://api.github.com/repos/seate/for-test/issues/9/comments"
+    },
+    "review_comments": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9/comments"
+    },
+    "review_comment": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/comments{/number}"
+    },
+    "commits": {
+      "href": "https://api.github.com/repos/seate/for-test/pulls/9/commits"
+    },
+    "statuses": {
+      "href": "https://api.github.com/repos/seate/for-test/statuses/4888b44d7204dd05680e90159af839c8b1194b6d"
+    }
+  },
+  "author_association": "OWNER",
+  "auto_merge": {
+    "enabled_by": {
+      "login": "seate",
+      "id": 86824703,
+      "node_id": "MDQ6VXNlcjg2ODI0NzAz",
+      "avatar_url": "https://avatars.githubusercontent.com/u/86824703?v=4",
+      "gravatar_id": "",
+      "url": "https://api.github.com/users/seate",
+      "html_url": "https://github.com/seate",
+      "followers_url": "https://api.github.com/users/seate/followers",
+      "following_url": "https://api.github.com/users/seate/following{/other_user}",
+      "gists_url": "https://api.github.com/users/seate/gists{/gist_id}",
+      "starred_url": "https://api.github.com/users/seate/starred{/owner}{/repo}",
+      "subscriptions_url": "https://api.github.com/users/seate/subscriptions",
+      "organizations_url": "https://api.github.com/users/seate/orgs",
+      "repos_url": "https://api.github.com/users/seate/repos",
+      "events_url": "https://api.github.com/users/seate/events{/privacy}",
+      "received_events_url": "https://api.github.com/users/seate/received_events",
+      "type": "User",
+      "user_view_type": "public",
+      "site_admin": false
+    },
+    "merge_method": "merge",
+    "commit_title": "This is commit title.",
+    "commit_message": "This is commit body."
+  },
+  "active_lock_reason": null,
+  "merged": false,
+  "mergeable": true,
+  "rebaseable": true,
+  "mergeable_state": "blocked",
+  "merged_by": null,
+  "comments": 1,
+  "review_comments": 0,
+  "maintainer_can_modify": false,
+  "commits": 16,
+  "additions": 642,
+  "deletions": 0,
+  "changed_files": 19
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/1-user.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/1-user.json
new file mode 100644
index 000000000..a6b92d442
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/1-user.json
@@ -0,0 +1,47 @@
+{
+  "id": "931de630-5c54-4bb3-877f-16430f46887f",
+  "name": "user",
+  "request": {
+    "url": "/user",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "1-user.json",
+    "headers": {
+      "Date": "Mon, 17 Mar 2025 07:04:43 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"91439c9cd22b1066c90ef899df4f995dcda9ed34b86d5e107b7c311aaaff2136\"",
+      "Last-Modified": "Mon, 03 Mar 2025 13:26:53 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4990",
+      "X-RateLimit-Reset": "1742197445",
+      "X-RateLimit-Used": "10",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "E025:4F3EE:A59617:F8E5A6:67D7C98B"
+    }
+  },
+  "uuid": "931de630-5c54-4bb3-877f-16430f46887f",
+  "persistent": true,
+  "insertionIndex": 1
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/2-r_s_for-test.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/2-r_s_for-test.json
new file mode 100644
index 000000000..268fdf44e
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/2-r_s_for-test.json
@@ -0,0 +1,47 @@
+{
+  "id": "cea6580e-f17f-43e1-b5c9-e27077b6ff17",
+  "name": "repos_seate_for-test",
+  "request": {
+    "url": "/repos/seate/for-test",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "2-r_s_for-test.json",
+    "headers": {
+      "Date": "Mon, 17 Mar 2025 07:04:45 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"9181d2d37a58759c6739fb93cdf26cbc7b9cc04f34e87456932f65921cb5473d\"",
+      "Last-Modified": "Sat, 15 Mar 2025 16:06:51 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4985",
+      "X-RateLimit-Reset": "1742197445",
+      "X-RateLimit-Used": "15",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "E027:1EF85A:16C064:1D9E9C:67D7C98D"
+    }
+  },
+  "uuid": "cea6580e-f17f-43e1-b5c9-e27077b6ff17",
+  "persistent": true,
+  "insertionIndex": 2
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/3-r_s_f_pulls_9.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/3-r_s_f_pulls_9.json
new file mode 100644
index 000000000..06d04c10a
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/3-r_s_f_pulls_9.json
@@ -0,0 +1,47 @@
+{
+  "id": "88725e34-4c36-4681-bc6a-f82ff05b80ef",
+  "name": "repos_seate_for-test_pulls_9",
+  "request": {
+    "url": "/repos/seate/for-test/pulls/9",
+    "method": "GET",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    }
+  },
+  "response": {
+    "status": 200,
+    "bodyFileName": "3-r_s_f_pulls_9.json",
+    "headers": {
+      "Date": "Mon, 17 Mar 2025 07:04:46 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "Cache-Control": "private, max-age=60, s-maxage=60",
+      "Vary": "Accept, Authorization, Cookie, X-GitHub-OTP,Accept-Encoding, Accept, X-Requested-With",
+      "ETag": "W/\"4cb91abd4bd5effc3228763b88c5abec155f063e483efaa6ba284bb351e27687\"",
+      "Last-Modified": "Sat, 15 Mar 2025 16:18:20 GMT",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "",
+      "X-GitHub-Media-Type": "github.v3; format=json",
+      "x-github-api-version-selected": "2022-11-28",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4984",
+      "X-RateLimit-Reset": "1742197445",
+      "X-RateLimit-Used": "16",
+      "X-RateLimit-Resource": "core",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "E028:1F17C6:160FCD:1CEEA4:67D7C98D"
+    }
+  },
+  "uuid": "88725e34-4c36-4681-bc6a-f82ff05b80ef",
+  "persistent": true,
+  "insertionIndex": 3
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/4-graphql.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/4-graphql.json
new file mode 100644
index 000000000..f1e592ffb
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/4-graphql.json
@@ -0,0 +1,50 @@
+{
+  "id": "ab9b1fcc-2e83-46f8-82a7-a5a6b19b9958",
+  "name": "graphql",
+  "request": {
+    "url": "/graphql",
+    "method": "POST",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    },
+    "bodyPatterns": [
+      {
+        "equalToJson": "{\"query\":\"query GetPullRequestID { repository(name: \\\"for-test\\\", owner: \\\"seate\\\") { pullRequest(number: 9) { id } } }\"}",
+        "ignoreArrayOrder": true,
+        "ignoreExtraElements": false
+      }
+    ]
+  },
+  "response": {
+    "status": 200,
+    "body": "{\"data\":{\"repository\":{\"pullRequest\":{\"id\":\"PR_kwDON6BPMc6Ox8DC\"}}}}",
+    "headers": {
+      "Date": "Mon, 17 Mar 2025 07:04:46 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v4; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4923",
+      "X-RateLimit-Reset": "1742196376",
+      "X-RateLimit-Used": "77",
+      "X-RateLimit-Resource": "graphql",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Vary": "Accept-Encoding, Accept, X-Requested-With",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "E029:3882B9:169857:1D842A:67D7C98E"
+    }
+  },
+  "uuid": "ab9b1fcc-2e83-46f8-82a7-a5a6b19b9958",
+  "persistent": true,
+  "insertionIndex": 4
+}
\ No newline at end of file
diff --git a/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/5-graphql.json b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/5-graphql.json
new file mode 100644
index 000000000..1f2dc6f41
--- /dev/null
+++ b/src/test/resources/org/kohsuke/github/GHPullRequestTest/wiremock/enablePullRequestAutoMergeFailure/mappings/5-graphql.json
@@ -0,0 +1,50 @@
+{
+  "id": "d219868c-dc53-4642-863d-64a268d3c115",
+  "name": "graphql",
+  "request": {
+    "url": "/graphql",
+    "method": "POST",
+    "headers": {
+      "Accept": {
+        "equalTo": "application/vnd.github+json"
+      }
+    },
+    "bodyPatterns": [
+      {
+        "equalToJson": "{\"query\":\"mutation EnableAutoMerge { enablePullRequestAutoMerge(input: { pullRequestId: \\\"PR_kwDON6BPMc6Ox8DC\\\" authorEmail: \\\"failureEmail@gmail.com\\\" clientMutationId: \\\"github-api\\\" commitBody: \\\"This is commit body.\\\" commitHeadline: \\\"This is commit title.\\\" expectedHeadOid: \\\"4888b44d7204dd05680e90159af839c8b1194b6d\\\"}) { pullRequest { id } } }\"}",
+        "ignoreArrayOrder": true,
+        "ignoreExtraElements": false
+      }
+    ]
+  },
+  "response": {
+    "status": 200,
+    "body": "{\"data\":{\"enablePullRequestAutoMerge\":null},\"errors\":[{\"type\":\"UNPROCESSABLE\",\"path\":[\"enablePullRequestAutoMerge\"],\"locations\":[{\"line\":1,\"column\":28}],\"message\":\"seate does not have a verified email, which is required to enable auto-merging.\"}]}",
+    "headers": {
+      "Date": "Mon, 17 Mar 2025 07:04:47 GMT",
+      "Content-Type": "application/json; charset=utf-8",
+      "X-OAuth-Scopes": "admin:repo_hook, gist, notifications, read:discussion, read:org, read:project, repo, user:email",
+      "X-Accepted-OAuth-Scopes": "repo",
+      "X-GitHub-Media-Type": "github.v4; format=json",
+      "X-RateLimit-Limit": "5000",
+      "X-RateLimit-Remaining": "4922",
+      "X-RateLimit-Reset": "1742196376",
+      "X-RateLimit-Used": "78",
+      "X-RateLimit-Resource": "graphql",
+      "Access-Control-Expose-Headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
+      "Access-Control-Allow-Origin": "*",
+      "Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
+      "X-Frame-Options": "deny",
+      "X-Content-Type-Options": "nosniff",
+      "X-XSS-Protection": "0",
+      "Referrer-Policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
+      "Content-Security-Policy": "default-src 'none'",
+      "Vary": "Accept-Encoding, Accept, X-Requested-With",
+      "Server": "github.com",
+      "X-GitHub-Request-Id": "E02A:FA314:AB056F:FE5536:67D7C98E"
+    }
+  },
+  "uuid": "d219868c-dc53-4642-863d-64a268d3c115",
+  "persistent": true,
+  "insertionIndex": 5
+}
\ No newline at end of file