[][src]Struct taskcluster::Github

pub struct Github(_);

GitHub Service

The github service is responsible for creating tasks in response to GitHub events, and posting results to the GitHub UI.

This document describes the API end-point for consuming GitHub web hooks, as well as some useful consumer APIs.

When Github forbids an action, this service returns an HTTP 403 with code ForbiddenByGithub.

Implementations

impl Github[src]

pub fn new<CB: Into<ClientBuilder>>(client_builder: CB) -> Result<Self, Error>[src]

Create a new undefined instance, based on the given client.

pub async fn ping(&self) -> Result<(), Error>[src]

Ping Server

Respond without doing anything. This endpoint is used to check that the service is up.

pub fn ping_url(&self) -> Result<String, Error>[src]

Generate an unsigned URL for the ping endpoint

pub fn ping_signed_url(&self, ttl: Duration) -> Result<String, Error>[src]

Generate a signed URL for the ping endpoint

pub async fn githubWebHookConsumer(&self) -> Result<(), Error>[src]

Consume GitHub WebHook

Capture a GitHub event and publish it via pulse, if it's a push, release or pull request.

pub async fn builds(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    organization: Option<&str>,
    repository: Option<&str>,
    sha: Option<&str>
) -> Result<Value, Error>
[src]

List of Builds

A paginated list of builds that have been run in Taskcluster. Can be filtered on various git-specific fields.

pub fn builds_url(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    organization: Option<&str>,
    repository: Option<&str>,
    sha: Option<&str>
) -> Result<String, Error>
[src]

Generate an unsigned URL for the builds endpoint

pub fn builds_signed_url(
    &self,
    continuationToken: Option<&str>,
    limit: Option<&str>,
    organization: Option<&str>,
    repository: Option<&str>,
    sha: Option<&str>,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the builds endpoint

pub async fn badge(
    &self,
    owner: &str,
    repo: &str,
    branch: &str
) -> Result<(), Error>
[src]

Latest Build Status Badge

Checks the status of the latest build of a given branch and returns corresponding badge svg.

pub fn badge_url(
    &self,
    owner: &str,
    repo: &str,
    branch: &str
) -> Result<String, Error>
[src]

Generate an unsigned URL for the badge endpoint

pub fn badge_signed_url(
    &self,
    owner: &str,
    repo: &str,
    branch: &str,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the badge endpoint

pub async fn repository(&self, owner: &str, repo: &str) -> Result<Value, Error>[src]

Get Repository Info

Returns any repository metadata that is useful within Taskcluster related services.

pub fn repository_url(&self, owner: &str, repo: &str) -> Result<String, Error>[src]

Generate an unsigned URL for the repository endpoint

pub fn repository_signed_url(
    &self,
    owner: &str,
    repo: &str,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the repository endpoint

pub async fn latest(
    &self,
    owner: &str,
    repo: &str,
    branch: &str
) -> Result<(), Error>
[src]

Latest Status for Branch

For a given branch of a repository, this will always point to a status page for the most recent task triggered by that branch.

Note: This is a redirect rather than a direct link.

pub fn latest_url(
    &self,
    owner: &str,
    repo: &str,
    branch: &str
) -> Result<String, Error>
[src]

Generate an unsigned URL for the latest endpoint

pub fn latest_signed_url(
    &self,
    owner: &str,
    repo: &str,
    branch: &str,
    ttl: Duration
) -> Result<String, Error>
[src]

Generate a signed URL for the latest endpoint

pub async fn createStatus(
    &self,
    owner: &str,
    repo: &str,
    sha: &str,
    payload: &Value
) -> Result<(), Error>
[src]

Post a status against a given changeset

For a given changeset (SHA) of a repository, this will attach a "commit status" on github. These statuses are links displayed next to each revision. The status is either OK (green check) or FAILURE (red cross), made of a custom title and link.

pub async fn createComment(
    &self,
    owner: &str,
    repo: &str,
    number: &str,
    payload: &Value
) -> Result<(), Error>
[src]

Post a comment on a given GitHub Issue or Pull Request

For a given Issue or Pull Request of a repository, this will write a new message.

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.