git-revision
The git-revision result subtype provides information about the branch and commit being built. It allows CodeNOW to associate the build with a specific point in the Git history.
Payload Fields
| Field | Required | Description |
|---|---|---|
type | Yes | Must be git-revision |
version | Yes | v1 |
repositoryUrl | Yes | URL of the Git repository |
branch | Yes | Name of the branch being built |
commitSha | Yes | SHA hash of the commit |
Example
curl -L -X POST 'https://api.cloud.codenow.com/ci/webhook' \
--header 'Accept: application/vnd.codenow.v1+json' \
--header 'Content-Type: application/vnd.codenow.v1+json' \
--header 'X-Codenow-Api-Key: {YOUR_CI_KEY}' \
--data-raw '{
"type": "codenow.ci.result.event",
"version": "application/vnd.codenow.v1+json",
"pipelineId": "my-pipeline-id",
"createdAt": "2024-01-01T00:00:00.000Z",
"payload": [{
"type": "git-revision",
"version": "v1",
"repositoryUrl": "url-to-the-repository",
"branch": "branch-name",
"commitSha": "hash-of-the-commit"
}]
}'