- 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
isrefs/tags
then the event will be triggered for the last tag.
- 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 |
Kind: global typedef
Properties
Name | Type |
---|---|
isBase64Encoded | boolean |
statusCode | number |
headers | Object |
headers['Content-Type' | string |
body | string |
Kind: global typedef
Properties
Name | Type |
---|---|
ref | string |
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 |
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 |