A helper and wrapper around @actions/github to easily access GitHub features. It is meant to be used with GitHub Actions.
An interface to access the GitHubContext
you get by injecting the GitHubContext into your action.
ATTENTION It is not complete. Add fields you need to the Context! For example there is no
event
field to access the event yet
Create a comment on the SHA retrieved from the GitHubContext
.
setStatus({ context: GitHubContext; description?: string; step: string; target_url?: string; state: 'pending' | 'success' | 'failure'; })
Set a status to the SHA from the GitHubContext
Optionally add a description
or target_url
. The status' context will be Tangro CI/${step}
.
Try to find a status for the GitHubContext
and with the status context Tangro CI/${step}
.
createSuccessfulDeployment({ context: GitHubContext, url: string, environment: string, description: string})
Create a successful deployment and set the url
, environment
and the description
for that deployment. Under the hood it creates a deployment and automatically sets its status to 'successs'