Skip to content

Conversation

Copy link

Copilot AI commented Dec 11, 2025

Description

Implements GitHub App webhook delivery APIs per hub4j/github-api#1404.

New classes:

  • GHAppHookDelivery - Webhook delivery with redeliver() method
  • GHAppHookDeliveryRequest - Request headers and payload
  • GHAppHookDeliveryResponse - Response headers and payload

New methods on GHApp:

Usage:

GHApp app = github.getApp();

// List all deliveries
for (GHAppHookDelivery delivery : app.listDeliveries()) {
    System.out.println(delivery.getEvent() + " - " + delivery.getStatus());
}

// Get specific delivery with full request/response details
GHAppHookDelivery delivery = app.getDelivery(12345678);
System.out.println(delivery.getRequest().getPayload());

// Redeliver
delivery.redeliver();

Before submitting a PR:

  • Changes must not break binary backwards compatibility. If you are unclear on how to make the change you think is needed while maintaining backward compatibility, CONTRIBUTING.md for details.
  • Add JavaDocs and other comments explaining the behavior.
  • When adding or updating methods that fetch entities, add @link JavaDoc entries to the relevant documentation on https://docs.github.com/en/rest .
  • Add tests that cover any added or changed code. This generally requires capturing snapshot test data. See CONTRIBUTING.md for details.
  • Run mvn -D enable-ci clean install site "-Dsurefire.argLine=--add-opens java.base/java.net=ALL-UNNAMED" locally. If this command doesn't succeed, your change will not pass CI.
  • Push your changes to a branch other than main. You will create your PR from that branch.

When creating a PR:

  • Fill in the "Description" above with clear summary of the changes. This includes:
  • All lines of new code should be covered by tests as reported by code coverage. Any lines that are not covered must have PR comments explaining why they cannot be covered. For example, "Reaching this particular exception is hard and is not a particular common scenario."
  • Enable "Allow edits from maintainers".

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • jitpack.io
    • Triggering command: /usr/bin/curl curl -s REDACTED (dns block)
  • repo.jenkins-ci.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/github-api/github-api org.codehaus.plexus.classworlds.launcher.Launcher compile -q -DskipTests (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/github-api/github-api org.codehaus.plexus.classworlds.launcher.Launcher dependency:resolve -DexcludeGroupIds=com.infradna.tool (dns block)
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/github-api/github-api org.codehaus.plexus.classworlds.launcher.Launcher compile -q -DskipTests -Prepo.jenkins-ci.org=REDACTED (dns block)
  • repository.sonatype.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.11/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.11/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.11 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.11/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/github-api/github-api org.codehaus.plexus.classworlds.launcher.Launcher compile -q -DskipTests (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

implement this: hub4j#1404


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 11, 2025 23:39
- Add GHAppHookDelivery class for webhook delivery representation
- Add GHAppHookDeliveryRequest class for request details
- Add GHAppHookDeliveryResponse class for response details
- Add listDeliveries() method to GHApp for listing webhook deliveries
- Add getDelivery() method to GHApp for getting specific delivery
- Add redeliver() method to GHAppHookDelivery for redelivering webhooks
- Add WireMock test resources for delivery tests
- Add unit tests for listDeliveries, getDelivery, and redeliver

Co-authored-by: Haarolean <[email protected]>
Addressed code review feedback to remove unnecessary TODO comments
that are not required in newer files.

Co-authored-by: Haarolean <[email protected]>
Copilot AI changed the title [WIP] Add cursor-based pagination to GitHub API Add GitHub App webhook delivery support Dec 11, 2025
Copilot AI requested a review from Haarolean December 11, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants