n8n integration (pull request webhook automation)¶
The SDETKit gate action posts the verdict on a pull request from GitHub Actions. To run the same flow from n8n instead:
- Send GitHub
pull_requestwebhook events to an n8n Webhook node. - Have n8n start a runner or container job that checks out the pull request head and runs:
python -m pip install sdetkit
python -m pip install -e ".[test]" # however your project installs its tests' dependencies
python -m sdetkit gate fast --format json --stable-json --out build/gate-fast.json --summary-out build/gate-summary.md
- Post the result back with the GitHub API:
- a commit status or check run whose state follows
verdict.decisioninbuild/gate-fast.json(SHIPandREVIEWpass;NOT_RUNandNO_SHIPfail); - a pull request comment with the contents of
build/gate-summary.md.
Payload¶
Include the pull request number, the repository owner and name, the head SHA, and a link to the job's logs in the status and the comment.