Skip to content

failsafe-engineering/trigger-github-actions-dispatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Functions

apiRequest(body, [method], token, url)ApiGatewayResponse

Make a request agains the Github API

repositoryDispatchHandler(event)Promise.<ApiGatewayResponse>

RepositoryDispatch handler Proxy a repository_dispatch event request

workflowDispatchHandler(event)Promise.<ApiGatewayResponse>

WorkflowDispatch handler Proxy a workflow_dispatch event request for the specified ref.

If the ref is refs/tags then the event will be triggered for the last tag.

Typedefs

ApiGatewayResponse : Object
GithubTag : Object
ApiGatewayEventRepositoryDispatch : Object

See: https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event--parameters

ApiGatewayEventWorkflowDispatch : Object

See: https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event--parameters

apiRequest(body, [method], token, url) ⇒ ApiGatewayResponse

Make a request agains the Github API

Kind: global function

Param Type Default Description
body Object
[method] string "POST"
token string Github Authorization token
url string

repositoryDispatchHandler(event) ⇒ Promise.<ApiGatewayResponse>

RepositoryDispatch handler Proxy a repository_dispatch event request

Kind: global function
Returns: Promise.<ApiGatewayResponse> - - Resolves to API Gateway formatted response
Throws:

  • Error - Error hitting the Github API, proxied from {apiRequest}
Param Type Description
event ApiGatewayEventRepositoryDispatch The API Gateway event

workflowDispatchHandler(event) ⇒ Promise.<ApiGatewayResponse>

WorkflowDispatch handler Proxy a workflow_dispatch event request for the specified ref.

If the ref is refs/tags then the event will be triggered for the last tag.

Kind: global function
Returns: Promise.<ApiGatewayResponse> - - Resolves to API Gateway formatted response
Throws:

  • Error - Error hitting the Github API, proxied from {apiRequest}
Param Type Description
event ApiGatewayEventWorkflowDispatch The API Gateway event

ApiGatewayResponse : Object

Kind: global typedef
Properties

Name Type
isBase64Encoded boolean
statusCode number
headers Object
headers['Content-Type' string
body string

GithubTag : Object

Kind: global typedef
Properties

Name Type
ref string

ApiGatewayEventRepositoryDispatch : Object

See: https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event--parameters

Kind: global typedef
Properties

Name Type Description
body string
headers Object
headers.Authorization string Github Authorization token
pathParameters Object
pathParameters.owner string Github repository owner
pathParameters.repo string Github repository name
queryStringParameters Object
queryStringParameters.eventType string A custom webhook event name

ApiGatewayEventWorkflowDispatch : Object

See: https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event--parameters

Kind: global typedef
Properties

Name Type Description
body string
headers Object
headers.Authorization string Github Authorization token
pathParameters Object
pathParameters.owner string Github repository owner
pathParameters.repo string Github repository name
pathParameters.workflowId string The ID of the workflow
queryStringParameters Object
queryStringParameters.ref string The git reference for the workflow

About

Trigger Github Actions Dispatches with a proxied webhook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published