[][src]Enum dishub::ops::EventPayload

pub enum EventPayload {
    CommitComment {
        content: String,
        commit_id: String,
        id: u64,
    },
    Create {
        ref_type: String,
        ref_name: Option<String>,
        master_branch: String,
        repo_description: String,
    },
    Delete {
        ref_type: String,
        ref_name: String,
    },
    Fork {
        new_slug: String,
    },
    Gollum {
        pages: Vec<GollumPayload>,
    },
    IssueComment {
        action: String,
        issue: u64,
        body: String,
        id: u64,
    },
    Issues {
        action: String,
        number: u64,
        title: String,
        body: String,
        labels: Vec<String>,
    },
    Member {
        action: String,
        user: String,
    },
    Public,
    PullRequest {
        action: String,
        number: u64,
        title: String,
        body: String,
        merged: bool,
    },
    PullRequestReview {
        action: String,
        pr: u64,
        state: String,
        body: String,
        id: u64,
    },
    PullRequestReviewComment {
        action: String,
        pr: u64,
        body: String,
        id: u64,
    },
    Push {
        pushed_ref: String,
        prev_head: String,
        new_head: String,
        size: u64,
        distinct_size: u64,
        commits: Vec<Commit>,
    },
    Release {
        action: String,
        tag_name: String,
        target: String,
        draft: bool,
        prerelease: bool,
        name: Option<String>,
        body: Option<String>,
    },
    Watch {
        action: String,
    },
    Other {
        event_type: String,
    },
}

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

A CommitCommentEvent.

Fields of CommitComment

The comment's body.

The commit SHA.

The comment's ID.

A CreateEvent.

Fields of Create

The ref's type.

Can be "repository", "branch", or "tag".

The ref's name.

None if only a repository was created.

The master branch of the repository.

The repository's description (the text right under the tab list).

A DeleteEvent.

Fields of Delete

The deleted ref's type.

Can be "branch" or "tag".

The deleted ref's name.

A ForkEvent.

Fields of Fork

The fork's slug.

A GollumEvent (a.k.a. a WikiEvent).

Fields of Gollum

The affected Wiki pages.

An IssueCommentEvent.

Fields of IssueComment

The action executed upon a comment.

Can be "created", "edited", or "deleted".

The issue number.

The issue comment's body text.

The issue comment's ID.

An IssuesEvent.

Fields of Issues

The action executed upon an issue.

Can be "assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "milestoned", "demilestoned", "closed", or "reopened".

The issue number.

The issue's title.

The issue body's text.

The labels the issue has upon it.

A MemberEvent.

Fields of Member

The action executed upon a user.

Can be only "added".

The user the action was performed upon.

A PublicEvent.

A repository was made public.

A PullRequestEvent.

Fields of PullRequest

The action executed upon a PR.

Can be "assigned", "unassigned", "labeled", "unlabeled", "opened", "edited", "closed", or "reopened".

If the action is "closed" and the merged is false, the pull request was closed with unmerged commits. If the action is "closed" and merged is true, the pull request was merged.

The PR number.

The PR's title.

The PR body's content.

Whether the PR was merged.

If the action is "closed" and the merged is false, the pull request was closed with unmerged commits. If the action is "closed" and merged is true, the pull request was merged.

A PullRequestReviewEvent.

Fields of PullRequestReview

The action executed upon a PR review.

Can be only "submitted".

The PR number.

The PR review's state.

Something like "approved".

The PR review's body.

The PR review's ID.

A PullRequestReviewCommentEvent.

Fields of PullRequestReviewComment

The action executed upon a PR review comment.

Can be "created", "edited", or "deleted".

The PR number.

The PR review comment's body.

The PR review comment's ID.

A PushEvent.

Fields of Push

The full Git ref pushed to.

The previous HEAD's SHA.

The new HEAD's SHA.

The amount of commits pushed.

The amount of distinct commits pushed.

The commits pushed.

A ReleaseEvent.

Fields of Release

The action executed upon a release.

Can be only "published".

The released tag's name.

The released branch's name.

Whether the release is a draft.

Whether the release is a prerelease.

The release's custom name.

This is None if the release is just a tag and not edited through the GitHub release editor.

The release's custom body.

This is None if the release is just a tag and not edited through the GitHub release editor.

A WatchEvent, or, more aptly, a StarEvent.

Fields of Watch

The action executed upon a repository star.

Can only be "started".

An unhandled event.

Fields of Other

The event type.

Methods

impl EventPayload
[src]

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for EventPayload
[src]

impl PartialEq<EventPayload> for EventPayload
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for EventPayload
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for EventPayload
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for EventPayload

impl Sync for EventPayload

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 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]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 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]

Get the TypeId of this object.