Skip to main content

Class: GitlabPlatform

@pvm/gitlab.GitlabPlatform

Hierarchy

Constructors

constructor

new GitlabPlatform(__namedParameters)

Parameters

NameType
__namedParametersObject
__namedParameters.configConfig

Overrides

PlatformInterfaceWithFileCommitApi.constructor

Defined in

packages/pvm-gitlab/platform.ts:67

Properties

config

Private config: Config

Defined in

packages/pvm-gitlab/platform.ts:65


currentMr

currentMr: null | MergeRequest = null

Overrides

PlatformInterfaceWithFileCommitApi.currentMr

Defined in

packages/pvm-gitlab/platform.ts:64


supportsFileCommitApi

supportsFileCommitApi: true

Overrides

PlatformInterfaceWithFileCommitApi.supportsFileCommitApi

Defined in

packages/pvm-gitlab/platform.ts:63

Methods

addFiles

addFiles(commitContext, file_paths): void

Parameters

NameType
commitContextCommitContext
file_pathsstring[]

Returns

void

Overrides

PlatformInterfaceWithFileCommitApi.addFiles

Defined in

packages/pvm-gitlab/platform.ts:217


addTag

addTag(tag_name, ref, opts?): Promise<any>

Parameters

NameType
tag_namestring
refstring
optsAddTagOptions

Returns

Promise<any>

Overrides

PlatformInterfaceWithFileCommitApi.addTag

Defined in

packages/pvm-gitlab/platform.ts:292


addTagAndRelease

addTagAndRelease(ref, tag_name, data): Promise<AlterReleaseResult>

Создает и тег и релиз, если тег уже есть то выбрасывается исключение

Parameters

NameType
refstring
tag_namestring
dataany

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterfaceWithFileCommitApi.addTagAndRelease

Defined in

packages/pvm-gitlab/platform.ts:160


appendFile

appendFile(commitContext, file_path, content): Promise<void>

Parameters

NameType
commitContextCommitContext
file_pathstring
contentstring

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.appendFile

Defined in

packages/pvm-gitlab/platform.ts:251


beginCommit

beginCommit(): CommitContext

Returns

CommitContext

Overrides

PlatformInterfaceWithFileCommitApi.beginCommit

Defined in

packages/pvm-gitlab/platform.ts:204


beginMrAttribution

beginMrAttribution(): Promise<void>

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.beginMrAttribution

Defined in

packages/pvm-gitlab/platform.ts:156


commit

commit(commitContext, message, opts?): Promise<CommitResult>

Parameters

NameType
commitContextCommitContext
messagestring
optsCommitOptions

Returns

Promise<CommitResult>

Overrides

PlatformInterfaceWithFileCommitApi.commit

Defined in

packages/pvm-gitlab/platform.ts:264


createMrNote

createMrNote(body): Promise<void>

Parameters

NameType
bodystring

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.createMrNote

Defined in

packages/pvm-gitlab/platform.ts:99


createProjectLabel

createProjectLabel(label, color): Promise<unknown>

Parameters

NameType
labelstring
colorstring

Returns

Promise<unknown>

Overrides

PlatformInterfaceWithFileCommitApi.createProjectLabel

Defined in

packages/pvm-gitlab/platform.ts:84


createRelease

createRelease(tag_name, data): Promise<AlterReleaseResult>

Создает релиз на существующем теге

Parameters

NameType
tag_namestring
dataany

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterfaceWithFileCommitApi.createRelease

Defined in

packages/pvm-gitlab/platform.ts:171


deleteFile

deleteFile(commitContext, file_path): Promise<void>

Parameters

NameType
commitContextCommitContext
file_pathstring

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.deleteFile

Defined in

packages/pvm-gitlab/platform.ts:241


editRelease

editRelease(tag_name, data): Promise<AlterReleaseResult>

Редактирует существующий релиз, если нет релиза или тега будет ошибка

Parameters

NameType
tag_nameany
dataany

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterfaceWithFileCommitApi.editRelease

Defined in

packages/pvm-gitlab/platform.ts:182


ensureMrLabels

ensureMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Inherited from

PlatformInterfaceWithFileCommitApi.ensureMrLabels

Defined in

packages/pvm-vcs/lib/platform-interface.ts:62


fetchLatestSha

fetchLatestSha(refName): Promise<string>

Parameters

NameType
refNamestring

Returns

Promise<string>

Overrides

PlatformInterfaceWithFileCommitApi.fetchLatestSha

Defined in

packages/pvm-gitlab/platform.ts:285


findMrNote

findMrNote(kind): Promise<void | MetaComment<Object>>

Parameters

NameType
kindstring

Returns

Promise<void | MetaComment<Object>>

Overrides

PlatformInterfaceWithFileCommitApi.findMrNote

Defined in

packages/pvm-gitlab/platform.ts:91


getCommitLink(commit): Promise<string>

Parameters

NameType
commitstring

Returns

Promise<string>

Overrides

PlatformInterfaceWithFileCommitApi.getCommitLink

Defined in

packages/pvm-gitlab/platform.ts:305


getCommitSha

getCommitSha(): string

Returns

string

Overrides

PlatformInterfaceWithFileCommitApi.getCommitSha

Defined in

packages/pvm-gitlab/platform.ts:313


getCurrentBranch

getCurrentBranch(): undefined | string

Returns

undefined | string

Overrides

PlatformInterfaceWithFileCommitApi.getCurrentBranch

Defined in

packages/pvm-gitlab/platform.ts:309


getProjectLabels

getProjectLabels(): AsyncIterable<Object>

Returns

AsyncIterable<Object>

Overrides

PlatformInterfaceWithFileCommitApi.getProjectLabels

Defined in

packages/pvm-gitlab/platform.ts:80


getRelease

getRelease(tagName): Promise<GetReleaseResult>

Возвращает релиз, если есть, для существующего тега. Результат если тега нет или нет релиза отличается по коду ответа

Parameters

NameType
tagNamestring

Returns

Promise<GetReleaseResult>

Overrides

PlatformInterfaceWithFileCommitApi.getRelease

Defined in

packages/pvm-gitlab/platform.ts:121


getUpdateHintsByCommit

getUpdateHintsByCommit(commit): Promise<null | Record<string, any>>

Parameters

NameType
commitstring

Returns

Promise<null | Record<string, any>>

Overrides

PlatformInterfaceWithFileCommitApi.getUpdateHintsByCommit

Defined in

packages/pvm-gitlab/platform.ts:317


logReleaseTag

Private logReleaseTag(tagName): void

Parameters

NameType
tagNamestring

Returns

void

Defined in

packages/pvm-gitlab/platform.ts:389


releaseTagsIterator

releaseTagsIterator(): AsyncGenerator<any, void, unknown>

Returns

AsyncGenerator<any, void, unknown>

Overrides

PlatformInterfaceWithFileCommitApi.releaseTagsIterator

Defined in

packages/pvm-gitlab/platform.ts:144


releasesIterator

releasesIterator(): AsyncGenerator<any, void, unknown>

Returns

AsyncGenerator<any, void, unknown>

Overrides

PlatformInterfaceWithFileCommitApi.releasesIterator

Defined in

packages/pvm-gitlab/platform.ts:140


requireMr

requireMr(): MergeRequest

Returns

MergeRequest

Overrides

PlatformInterfaceWithFileCommitApi.requireMr

Defined in

packages/pvm-gitlab/platform.ts:148


rollbackCommit

rollbackCommit(_): Promise<void>

Parameters

NameType
_CommitContext

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.rollbackCommit

Defined in

packages/pvm-gitlab/platform.ts:212


setMrLabels

setMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Overrides

PlatformInterfaceWithFileCommitApi.setMrLabels

Defined in

packages/pvm-gitlab/platform.ts:72


syncAttachment

syncAttachment(kind, attachment, opts?): Promise<HttpResponseSuccess<any>>

Parameters

NameType
kindstring
attachmentBuffer
optsSyncAttachmentOpts

Returns

Promise<HttpResponseSuccess<any>>

Overrides

PlatformInterfaceWithFileCommitApi.syncAttachment

Defined in

packages/pvm-gitlab/platform.ts:200


syncText

syncText(kind, text): Promise<unknown>

Parameters

NameType
kindstring
textstring

Returns

Promise<unknown>

Inherited from

PlatformInterfaceWithFileCommitApi.syncText

Defined in

packages/pvm-vcs/lib/platform-interface.ts:50


updateFile

updateFile(commitContext, file_path, content): Promise<void>

Parameters

NameType
commitContextCommitContext
file_pathstring
contentstring

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.updateFile

Defined in

packages/pvm-gitlab/platform.ts:234


updateMrNote

updateMrNote(commentId, body): Promise<void>

Parameters

NameType
commentIdnumber
bodystring

Returns

Promise<void>

Overrides

PlatformInterfaceWithFileCommitApi.updateMrNote

Defined in

packages/pvm-gitlab/platform.ts:110


upsertRelease

upsertRelease(tagName, data): Promise<AlterReleaseResult>

Редактирует или создает релиз, тег должен существовать

Parameters

NameType
tagNamestring
dataany

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterfaceWithFileCommitApi.upsertRelease

Defined in

packages/pvm-gitlab/platform.ts:189


getPvmUpdateHintsFromString

Static getPvmUpdateHintsFromString(text): null | Record<string, any>

Parameters

NameType
textstring

Returns

null | Record<string, any>

Defined in

packages/pvm-gitlab/platform.ts:354