From 266dd5da43a153cfa1397b5c8d4bf17025660cd6 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 11 Sep 2022 05:27:49 -0700 Subject: [PATCH] Revert pull_request field change. --- src/github.rs | 26 ++++++++++++++++---------- src/handlers/review_submitted.rs | 3 ++- src/lib.rs | 8 +++++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/github.rs b/src/github.rs index c8f6555ba..c2d9e6843 100644 --- a/src/github.rs +++ b/src/github.rs @@ -231,6 +231,16 @@ pub struct Label { pub name: String, } +/// An indicator used to differentiate between an issue and a pull request. +/// +/// Some webhook events include a `pull_request` field in the Issue object, +/// and some don't. GitHub does include a few fields here, but they aren't +/// needed at this time (merged_at, diff_url, html_url, patch_url, url). +#[derive(Debug, serde::Deserialize)] +pub struct PullRequestDetails { + // none for now +} + /// An issue or pull request. /// /// For convenience, since issues and pull requests share most of their @@ -259,16 +269,12 @@ pub struct Issue { pub user: User, pub labels: Vec