Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

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

ParamTypeDefaultDescription
bodyObject
[method]string"POST"
tokenstringGithub Authorization token
urlstring

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}
ParamTypeDescription
eventApiGatewayEventRepositoryDispatchThe 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}
ParamTypeDescription
eventApiGatewayEventWorkflowDispatchThe API Gateway event

ApiGatewayResponse : Object

Kind: global typedef
Properties

NameType
isBase64Encodedboolean
statusCodenumber
headersObject
headers['Content-Type'string
bodystring

GithubTag : Object

Kind: global typedef
Properties

NameType
refstring

ApiGatewayEventRepositoryDispatch : Object

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

Kind: global typedef
Properties

NameTypeDescription
bodystring
headersObject
headers.AuthorizationstringGithub Authorization token
pathParametersObject
pathParameters.ownerstringGithub repository owner
pathParameters.repostringGithub repository name
queryStringParametersObject
queryStringParameters.eventTypestringA 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

NameTypeDescription
bodystring
headersObject
headers.AuthorizationstringGithub Authorization token
pathParametersObject
pathParameters.ownerstringGithub repository owner
pathParameters.repostringGithub repository name
pathParameters.workflowIdstringThe ID of the workflow
queryStringParametersObject
queryStringParameters.refstringThe git reference for the workflow

About

Trigger Github Actions Dispatches with a proxied webhook

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages