pub struct PushEvent<'a> {
Show 15 fields pub ref_: &'a str, pub before: &'a str, pub after: &'a str, pub created: bool, pub deleted: bool, pub forced: bool, pub base_ref: Option<&'a str>, pub compare: &'a str, pub commits: Vec<Commit<'a>>, pub head_commit: Option<Commit<'a>>, pub repository: Repository<'a>, pub pusher: Committer<'a>, pub sender: User<'a>, pub installation: Option<InstallationLite<'a>>, pub organization: Option<Organization<'a>>,
}

Fields§

§ref_: &'a str

The full git ref that was pushed. Example: refs/heads/main or refs/tags/v3.14.1.

§before: &'a str

The SHA of the most recent commit on ref before the push.

§after: &'a str

The SHA of the most recent commit on ref after the push.

§created: bool

Whether this push created the ref.

§deleted: bool

Whether this push deleted the ref.

§forced: bool

Whether this push was a force push of the ref.

§base_ref: Option<&'a str>§compare: &'a str

URL that shows the changes in this ref update, from the before commit to the after commit. For a newly created ref that is directly based on the default branch, this is the comparison between the head of the default branch and the after commit. Otherwise, this shows all commits until the after commit.

§commits: Vec<Commit<'a>>

An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the compare between the before commit and the after commit.) The array includes a maximum of 20 commits. If necessary, you can use the Commits API to fetch additional commits. This limit is applied to timeline events only and isn’t applied to webhook deliveries.

§head_commit: Option<Commit<'a>>

For pushes where after is or points to a commit object, an expanded representation of that commit. For pushes where after refers to an annotated tag object, an expanded representation of the commit pointed to by the annotated tag.

§repository: Repository<'a>§pusher: Committer<'a>§sender: User<'a>§installation: Option<InstallationLite<'a>>§organization: Option<Organization<'a>>

Trait Implementations§

source§

impl<'a> Debug for PushEvent<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de: 'a, 'a> Deserialize<'de> for PushEvent<'a>

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for PushEvent<'a>

§

impl<'a> Send for PushEvent<'a>

§

impl<'a> Sync for PushEvent<'a>

§

impl<'a> Unpin for PushEvent<'a>

§

impl<'a> UnwindSafe for PushEvent<'a>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,