This action verifies that the Clubhouse story associated with a PR has been accepted.
It looks for the "Accepted" label and sends a passing or failing Status Check by sending
a POST: /repos/{owner}/{repo}/statuses/{sha}
.
See the docs on Github for more
on:
# Future functionality
# repository_dispatch:
# types: ["shortcut-acceptance"]
pull_request:
types: [opened, synchronize, reopened]
uses: rotabull/rotabull-ch-acceptance-helper@main
with:
github-token: '123'
clubhouse-token: '123'
......
This action can be run on pull_request
.
In the future, it may also be run on a repository dispatch
. In the case of a repository dispatch, a client payload must be provided:
{
"event_type": "shortcut-acceptance",
"client_payload": {
"story_id": 1234,
"accepted": true
}
}
Required Github token, added by Github workflow as an env var. It's used in order to call Github API.
Required Clubhouse API, token added by Github workflow as an env var. It's used in order to call Clubhouse API.
npm install
npm test
This project uses ncc to build a new distribution version of it:
npm i -g @vercel/ncc
ncc build index.js --license licenses.txt