Struct github_webhook::payload_types::PushEvent
source · 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>>