Skip to main content

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

FieldRequiredDescription
typeYesMust be git-revision
versionYesv1
repositoryUrlYesURL of the Git repository
branchYesName of the branch being built
commitShaYesSHA 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"
}]
}'