webhook: add run creation trigger type
This commit is contained in:
parent
1938c2daaf
commit
5b22ebc2d3
|
@ -50,6 +50,8 @@ const (
|
|||
AnnotationProjectID = "projectid"
|
||||
AnnotationUserID = "userid"
|
||||
|
||||
AnnotationRunCreationTrigger = "run_creation_trigger"
|
||||
|
||||
AnnotationCommitSHA = "commit_sha"
|
||||
AnnotationRef = "ref"
|
||||
AnnotationSender = "sender"
|
||||
|
@ -264,6 +266,7 @@ func (h *webhooksHandler) handleWebhook(r *http.Request) (int, string, error) {
|
|||
annotations := map[string]string{
|
||||
AnnotationRunType: string(runType),
|
||||
AnnotationRefType: string(refType),
|
||||
AnnotationRunCreationTrigger: string(types.RunCreationTriggerTypeWebhook),
|
||||
AnnotationCommitSHA: webhookData.CommitSHA,
|
||||
AnnotationRef: webhookData.Ref,
|
||||
AnnotationSender: webhookData.Sender,
|
||||
|
|
|
@ -28,3 +28,9 @@ const (
|
|||
RunRefTypeTag RunRefType = "tag"
|
||||
RunRefTypePullRequest RunRefType = "pull_request"
|
||||
)
|
||||
|
||||
type RunCreationTriggerType string
|
||||
|
||||
const (
|
||||
RunCreationTriggerTypeWebhook RunCreationTriggerType = "webhook"
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue