[−][src]Struct taskcluster::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]
&self,
continuationToken: Option<&str>,
limit: Option<&str>,
organization: Option<&str>,
repository: Option<&str>,
sha: Option<&str>
) -> Result<Value, Error>
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]
&self,
continuationToken: Option<&str>,
limit: Option<&str>,
organization: Option<&str>,
repository: Option<&str>,
sha: Option<&str>
) -> Result<String, Error>
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]
&self,
continuationToken: Option<&str>,
limit: Option<&str>,
organization: Option<&str>,
repository: Option<&str>,
sha: Option<&str>,
ttl: Duration
) -> Result<String, Error>
Generate a signed URL for the builds endpoint
pub async fn badge(
&self,
owner: &str,
repo: &str,
branch: &str
) -> Result<(), Error>
[src]
&self,
owner: &str,
repo: &str,
branch: &str
) -> Result<(), Error>
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]
&self,
owner: &str,
repo: &str,
branch: &str
) -> Result<String, Error>
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]
&self,
owner: &str,
repo: &str,
branch: &str,
ttl: Duration
) -> Result<String, Error>
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]
&self,
owner: &str,
repo: &str,
ttl: Duration
) -> Result<String, Error>
Generate a signed URL for the repository endpoint
pub async fn latest(
&self,
owner: &str,
repo: &str,
branch: &str
) -> Result<(), Error>
[src]
&self,
owner: &str,
repo: &str,
branch: &str
) -> Result<(), Error>
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]
&self,
owner: &str,
repo: &str,
branch: &str
) -> Result<String, Error>
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]
&self,
owner: &str,
repo: &str,
branch: &str,
ttl: Duration
) -> Result<String, Error>
Generate a signed URL for the latest endpoint
pub async fn createStatus(
&self,
owner: &str,
repo: &str,
sha: &str,
payload: &Value
) -> Result<(), Error>
[src]
&self,
owner: &str,
repo: &str,
sha: &str,
payload: &Value
) -> Result<(), Error>
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]
&self,
owner: &str,
repo: &str,
number: &str,
payload: &Value
) -> Result<(), Error>
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
impl !RefUnwindSafe for Github
[src]
impl Send for Github
[src]
impl Sync for Github
[src]
impl Unpin for Github
[src]
impl !UnwindSafe for Github
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,