This is a mini-guide on adding new CI provider to JavaScript client.
-
Create new file in
packages/client/src/ci-providers
. You can copyCircle.ts
and use it as scaffolding. -
If your CI creates explicit CI run on PR creation then set
supportsSpeculativeBranchSelection
to false. Otherwise return true. For example: CircleCI always runs your code on push. That's why we sometimes need to "guess" base branch (only before PR is really created by the user). Read more -
Implement rest of the class
-
Don't forget to add tests. Currently we test new CI providers by adding raw environment dump (you can use
printenv
) and asserting correct data. Example