Model Definition
DevOpsChangedEntityEvent
Represents an event fired by DevOps integration source
interface DevOpsChangedEntityEvent {
account: string // account host
profileId: number // id of devops integration profile
modification: 'Created' | 'Updated' | 'Deleted' // event modifictation
entityType: 'MergeRequest' | 'Branch' | 'Pipeline' | 'Repository'// type of the entity that was updated
current: MergeRequest | Branch | Pipeline | Repository // current state of the entity
previous?: MergeRequest | Branch | Pipeline | Repository // previous state of the entity
changedFields: string[] // list of the properties that was modified
targetprocessEntityIds: number[] // id of Targetprocess entities to which this devops object is attached
action?: 'Created' | 'Approved' | 'Merged' | 'Closed' | 'Edited' // for merge request events only. Represents type of action that was made with merge request.
}
MergeRequest
Represents an integration definition of merge request
interace MergeRequest {
id: number // An integration id
sourceId: string // Id in DevOps tool
title: string // merge reques title
isDraft: boolean // Is it a draft (work in progress)
url: string // url to merge request in devops tool
state: 'Opened' | 'Closed' | 'Locked' 'Merged' // merge request state
reviewStatus: MergeRequestReviewStatus // status of merge request review process
mergeStatus: 'CanBeMerged' | 'CanNotBeMerged' | 'Unknown' // if merge requst has merge conflicts
branch: BranchRef // reference to merge request branch
repository: IdentityRef // reference to merge request repository
}
IdentityRef
Simple ref to other object
interface IdentityRef {
id: number // an integration id
sourceId: string // an DevOps tool id
}
BranchRef
Short ref to branch
interface BranchRef {
id: number // an integration id
name: string // branch name
}
MergeRequestReviewStatus
Merge request review status
interface MergeRequestReviewStatus {
countOfReviewersRequired: number // count of approvals required by tool policy
countOfReviewersDone: number // count of approvals done
state: 'Pending' | 'Approved' | 'Rejected' // calculated review state
}
Repository
Represents repository in DevOps integration
interface Repository {
id: number // an integration id
sourceId: string // a DevOps tool id
name: string // repository name
url: string // repository url
}
Branch
Represents branch in DevOps integration
interface Branch {
id: number // an integration id
name: string // branch name
url: string // url to the branch in DevOps tool
repository: IdentityRef // reference to branch repository
entityIds: number[] // Ids of Targetprocess entitites branch is attached to
}
BranchFull
Represents full branch model in DevOps integration
interface BranchFull {
id: number // an integration id
isDeleted: boolean // is branch already deleted
name: string // branch name
url: string // url to the branch in DevOps tool
repository: Repository // reference to branch repository
entityIds: number[] // Ids of Targetprocess entitites branch is attached to
mergeRequests: MergeRequest[] // list of merge requests created from this branch
tool: 'GitLab' | 'GitHub' | 'Phabricator' | 'AzureDevOps' | 'Bitbucket' | 'BitbucketServer' // type of DevOp tool
lastPipeline: Pipeline | undefined // last pipeline on this branch (in general in various tools it is called differently Pipeline, Check Suite, Build etc.)
}
Pipeline
Represents pipeline (in general in various tools it is called differently Pipeline, Check Suite, Build etc.)
interface Pipeline {
id: number // an integration id
sourceId: string // id in DevOps tool
url: string; // url to pipeline details in DevOps tool
status: 'Running' | 'Pending' | 'Success' | 'Failed' | 'Cancelled' | 'Skipped' // pipeline status
branch: BranchRef // reference to the branch
repository: IdentityRef // reference to the repository
}
Updated about 5 years ago