Skip to main content

Class: PlatformInterfaceWithFileCommitApi<TMergeRequest, TCommitContext>

@pvm/vcs.PlatformInterfaceWithFileCommitApi

Type parameters

Name
TMergeRequest
TCommitContext

Hierarchy

Implements

Constructors

constructor

new PlatformInterfaceWithFileCommitApi<TMergeRequest, TCommitContext>()

Type parameters

Name
TMergeRequest
TCommitContext

Inherited from

PlatformInterface.constructor

Properties

currentMr

currentMr: null | TMergeRequest

Inherited from

PlatformInterface.currentMr

Defined in

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


supportsFileCommitApi

supportsFileCommitApi: boolean = true

Defined in

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

Methods

addFiles

Abstract addFiles(commitContext, filePaths): void

Parameters

NameType
commitContextTCommitContext
filePathsstring[]

Returns

void

Implementation of

FileCommitApi.addFiles

Defined in

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


addTag

Abstract addTag(tag_name, ref): Promise<unknown>

Parameters

NameType
tag_namestring
refstring

Returns

Promise<unknown>

Inherited from

PlatformInterface.addTag

Defined in

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


addTagAndRelease

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

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

Parameters

NameType
refstring
tag_namestring
dataCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Inherited from

PlatformInterface.addTagAndRelease

Defined in

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


appendFile

Abstract appendFile(commitContext, filePath, content): void

Parameters

NameType
commitContextTCommitContext
filePathstring
contentstring

Returns

void

Implementation of

FileCommitApi.appendFile

Defined in

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


beginCommit

Abstract beginCommit(): TCommitContext

Returns

TCommitContext

Implementation of

FileCommitApi.beginCommit

Defined in

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


beginMrAttribution

Abstract beginMrAttribution(): void

Returns

void

Inherited from

PlatformInterface.beginMrAttribution

Defined in

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


commit

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

Parameters

NameType
commitContextTCommitContext
messagestring
opts?CommitOptions

Returns

Promise<CommitResult>

Implementation of

FileCommitApi.commit

Defined in

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


createMrNote

Abstract createMrNote(body): Promise<unknown>

Parameters

NameType
bodystring

Returns

Promise<unknown>

Inherited from

PlatformInterface.createMrNote

Defined in

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


createProjectLabel

Abstract createProjectLabel(label, color): Promise<unknown>

Parameters

NameType
labelstring
colorstring

Returns

Promise<unknown>

Inherited from

PlatformInterface.createProjectLabel

Defined in

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


createRelease

Abstract createRelease(tagName, payload): Promise<AlterReleaseResult>

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

Parameters

NameType
tagNamestring
payloadCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Inherited from

PlatformInterface.createRelease

Defined in

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


deleteFile

Abstract deleteFile(commitContext, file_path): void

Parameters

NameType
commitContextTCommitContext
file_pathstring

Returns

void

Implementation of

FileCommitApi.deleteFile

Defined in

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


editRelease

Abstract editRelease(tag_name, data): Promise<AlterReleaseResult>

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

Parameters

NameType
tag_namestring
dataReleasePayload

Returns

Promise<AlterReleaseResult>

Inherited from

PlatformInterface.editRelease

Defined in

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


ensureMrLabels

ensureMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Inherited from

PlatformInterface.ensureMrLabels

Defined in

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


fetchLatestSha

Abstract fetchLatestSha(refName): Promise<string>

Parameters

NameType
refNamestring

Returns

Promise<string>

Inherited from

PlatformInterface.fetchLatestSha

Defined in

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


findMrNote

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

Parameters

NameType
kindstring

Returns

Promise<void | MetaComment<Object>>

Inherited from

PlatformInterface.findMrNote

Defined in

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


Abstract getCommitLink(commit): Promise<null | string>

Parameters

NameType
commitstring

Returns

Promise<null | string>

Inherited from

PlatformInterface.getCommitLink

Defined in

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


getCommitSha

Abstract getCommitSha(): string

Returns

string

Inherited from

PlatformInterface.getCommitSha

Defined in

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


getCurrentBranch

Abstract getCurrentBranch(cwd): undefined | string

Parameters

NameType
cwdstring

Returns

undefined | string

Inherited from

PlatformInterface.getCurrentBranch

Defined in

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


getProjectLabels

Abstract getProjectLabels(): AsyncIterable<Object>

Returns

AsyncIterable<Object>

Inherited from

PlatformInterface.getProjectLabels

Defined in

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


getRelease

Abstract getRelease(tagName): Promise<GetReleaseResult>

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

Parameters

NameType
tagNamestring

Returns

Promise<GetReleaseResult>

Inherited from

PlatformInterface.getRelease

Defined in

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


getUpdateHintsByCommit

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

Parameters

NameType
commitstring

Returns

Promise<null | Record<string, any>>

Inherited from

PlatformInterface.getUpdateHintsByCommit

Defined in

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


releaseTagsIterator

Abstract releaseTagsIterator(): AsyncGenerator<PlatformReleaseTag, void, any>

Returns

AsyncGenerator<PlatformReleaseTag, void, any>

Inherited from

PlatformInterface.releaseTagsIterator

Defined in

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


releasesIterator

Abstract releasesIterator(): AsyncGenerator<VcsRelease, void, any>

Returns

AsyncGenerator<VcsRelease, void, any>

Inherited from

PlatformInterface.releasesIterator

Defined in

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


requireMr

Abstract requireMr(): TMergeRequest

Returns

TMergeRequest

Inherited from

PlatformInterface.requireMr

Defined in

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


rollbackCommit

Abstract rollbackCommit(commitContext): Promise<void>

Parameters

NameType
commitContextTCommitContext

Returns

Promise<void>

Implementation of

FileCommitApi.rollbackCommit

Defined in

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


setMrLabels

Abstract setMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Inherited from

PlatformInterface.setMrLabels

Defined in

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


syncAttachment

Abstract syncAttachment(kind, attachment, opts): Promise<unknown>

Parameters

NameType
kindstring
attachmentBuffer
optsany

Returns

Promise<unknown>

Inherited from

PlatformInterface.syncAttachment

Defined in

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


syncText

syncText(kind, text): Promise<unknown>

Parameters

NameType
kindstring
textstring

Returns

Promise<unknown>

Inherited from

PlatformInterface.syncText

Defined in

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


updateFile

Abstract updateFile(commitContext, file_path, content): void

Parameters

NameType
commitContextTCommitContext
file_pathany
contentany

Returns

void

Implementation of

FileCommitApi.updateFile

Defined in

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


updateMrNote

Abstract updateMrNote(commentId, body): Promise<unknown>

Parameters

NameType
commentIdstring | number
bodystring

Returns

Promise<unknown>

Inherited from

PlatformInterface.updateMrNote

Defined in

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


upsertRelease

Abstract upsertRelease(tag_name, data): Promise<unknown>

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

Parameters

NameType
tag_namestring
dataReleasePayload

Returns

Promise<unknown>

Inherited from

PlatformInterface.upsertRelease

Defined in

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