[−][src]Enum dishub::ops::EventPayload
A representation of the GitHub Event API's event payload.
We only represent the event types that are visible in timelines and haven't been phased out yet.
Variants
CommitComment
Fields of CommitComment
content: String | The comment's body. |
commit_id: String | The commit SHA. |
id: u64 | The comment's ID. |
Create
A CreateEvent.
Fields of Create
ref_type: String | The ref's type. Can be "repository", "branch", or "tag". |
ref_name: Option<String> | The ref's name.
|
master_branch: String | The master branch of the repository. |
repo_description: String | The repository's description (the text right under the tab list). |
Delete
A DeleteEvent.
Fields of Delete
ref_type: String | The deleted ref's type. Can be "branch" or "tag". |
ref_name: String | The deleted ref's name. |
Fork
A ForkEvent.
Fields of Fork
new_slug: String | The fork's slug. |
Gollum
A GollumEvent (a.k.a. a WikiEvent).
Fields of Gollum
pages: Vec<GollumPayload> | The affected Wiki pages. |
IssueComment
Fields of IssueComment
action: String | The action executed upon a comment. Can be "created", "edited", or "deleted". |
issue: u64 | The issue number. |
body: String | The issue comment's body text. |
id: u64 | The issue comment's ID. |
Issues
An IssuesEvent.
Fields of Issues
action: String | The action executed upon an issue. Can be "assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "milestoned", "demilestoned", "closed", or "reopened". |
number: u64 | The issue number. |
title: String | The issue's title. |
body: String | The issue body's text. |
labels: Vec<String> | The labels the issue has upon it. |
Member
A MemberEvent.
Fields of Member
action: String | The action executed upon a user. Can be only "added". |
user: String | The user the action was performed upon. |
Public
A PublicEvent.
A repository was made public.
PullRequest
Fields of PullRequest
action: String | The action executed upon a PR. Can be "assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", or "reopened". If the action is "closed" and the |
number: u64 | The PR number. |
title: String | The PR's title. |
body: String | The PR body's content. |
merged: bool | Whether the PR was merged. If the action is "closed" and the |
PullRequestReview
Fields of PullRequestReview
action: String | The action executed upon a PR review. Can be only "submitted". |
pr: u64 | The PR number. |
state: String | The PR review's state. Something like "approved". |
body: String | The PR review's body. |
id: u64 | The PR review's ID. |
PullRequestReviewComment
Fields of PullRequestReviewComment
action: String | The action executed upon a PR review comment. Can be "created", "edited", or "deleted". |
pr: u64 | The PR number. |
body: String | The PR review comment's body. |
id: u64 | The PR review comment's ID. |
Push
A PushEvent.
Fields of Push
pushed_ref: String | The full Git ref pushed to. |
prev_head: String | The previous HEAD's SHA. |
new_head: String | The new HEAD's SHA. |
size: u64 | The amount of commits pushed. |
distinct_size: u64 | The amount of distinct commits pushed. |
commits: Vec<Commit> | The commits pushed. |
Release
A ReleaseEvent.
Fields of Release
action: String | The action executed upon a release. Can be only "published". |
tag_name: String | The released tag's name. |
target: String | The released branch's name. |
draft: bool | Whether the release is a draft. |
prerelease: bool | Whether the release is a prerelease. |
name: Option<String> | The release's custom name. This is |
body: Option<String> | The release's custom body. This is |
Watch
A WatchEvent, or, more aptly, a StarEvent.
Fields of Watch
action: String | The action executed upon a repository star. Can only be "started". |
Other
An unhandled event.
Fields of Other
event_type: String | The event type. |
Methods
impl EventPayload
[src]
impl EventPayload
pub fn from(tpe: &str, payload: &JsonValue) -> EventPayload
[src]
pub fn from(tpe: &str, payload: &JsonValue) -> EventPayload
Parse the payload from the payload
key of the event and the type.
Not meant to be used directly, use Event::parse()
instead.
Trait Implementations
impl Clone for EventPayload
[src]
impl Clone for EventPayload
fn clone(&self) -> EventPayload
[src]
fn clone(&self) -> EventPayload
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for EventPayload
[src]
impl Eq for EventPayload
impl PartialEq<EventPayload> for EventPayload
[src]
impl PartialEq<EventPayload> for EventPayload
fn eq(&self, other: &EventPayload) -> bool
[src]
fn eq(&self, other: &EventPayload) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &EventPayload) -> bool
[src]
fn ne(&self, other: &EventPayload) -> bool
This method tests for !=
.
impl Hash for EventPayload
[src]
impl Hash for EventPayload
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for EventPayload
[src]
impl Debug for EventPayload
Auto Trait Implementations
impl Send for EventPayload
impl Send for EventPayload
impl Sync for EventPayload
impl Sync for EventPayload
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Typeable for T where
T: Any,
[src]
impl<T> Typeable for T where
T: Any,