Skip to main content

Class: BasePlatformInterface<MergeRequest>

@pvm/types.BasePlatformInterface

Type parameters

Name
MergeRequest

Hierarchy

Constructors

constructor

new BasePlatformInterface<MergeRequest>()

Type parameters

Name
MergeRequest

Properties

currentMr

currentMr: null | MergeRequest = null

Defined in

packages/pvm-types/lib/platform.ts:10

Methods

addTag

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

Parameters

NameType
tag_namestring
refstring

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:31


addTagAndRelease

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

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

Parameters

NameType
refstring
tag_namestring
dataCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Defined in

packages/pvm-types/lib/platform.ts:14


beginMrAttribution

Abstract beginMrAttribution(): void

Returns

void

Defined in

packages/pvm-types/lib/platform.ts:26


createMrNote

Abstract createMrNote(body): Promise<unknown>

Parameters

NameType
bodystring

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:38


createProjectLabel

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

Parameters

NameType
labelstring
colorstring

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:42


createRelease

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

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

Parameters

NameType
tagNamestring
payloadCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Defined in

packages/pvm-types/lib/platform.ts:16


editRelease

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

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

Parameters

NameType
tag_namestring
dataReleasePayload

Returns

Promise<AlterReleaseResult>

Defined in

packages/pvm-types/lib/platform.ts:20


ensureMrLabels

Abstract ensureMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:49


fetchLatestSha

Abstract fetchLatestSha(refName): Promise<string>

Parameters

NameType
refNamestring

Returns

Promise<string>

Defined in

packages/pvm-types/lib/platform.ts:28


findMrNote

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

Parameters

NameType
kindstring

Returns

Promise<void | MetaComment<Object>>

Defined in

packages/pvm-types/lib/platform.ts:33


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

Parameters

NameType
commitstring

Returns

Promise<null | string>

Defined in

packages/pvm-types/lib/platform.ts:12


getCommitSha

Abstract getCommitSha(): string

Returns

string

Defined in

packages/pvm-types/lib/platform.ts:30


getCurrentBranch

Abstract getCurrentBranch(cwd): undefined | string

Parameters

NameType
cwdstring

Returns

undefined | string

Defined in

packages/pvm-types/lib/platform.ts:29


getProjectLabels

Abstract getProjectLabels(): AsyncIterable<Object>

Returns

AsyncIterable<Object>

Defined in

packages/pvm-types/lib/platform.ts:41


getRelease

Abstract getRelease(tagName): Promise<GetReleaseResult>

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

Parameters

NameType
tagNamestring

Returns

Promise<GetReleaseResult>

Defined in

packages/pvm-types/lib/platform.ts:18


getUpdateHintsByCommit

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

Parameters

NameType
commitstring

Returns

Promise<null | Record<string, any>>

Defined in

packages/pvm-types/lib/platform.ts:45


releaseTagsIterator

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

Returns

AsyncGenerator<PlatformReleaseTag, void, any>

Defined in

packages/pvm-types/lib/platform.ts:24


releasesIterator

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

Returns

AsyncGenerator<VcsRelease, void, any>

Defined in

packages/pvm-types/lib/platform.ts:23


requireMr

Abstract requireMr(): MergeRequest

Returns

MergeRequest

Defined in

packages/pvm-types/lib/platform.ts:11


setMrLabels

Abstract setMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:43


syncAttachment

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

Parameters

NameType
kindstring
attachmentBuffer
optsany

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:25


syncText

Abstract syncText(kind, text): Promise<unknown>

Parameters

NameType
kindstring
textstring

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:47


updateMrNote

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

Parameters

NameType
commentIdstring | number
bodystring

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:39


upsertRelease

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

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

Parameters

NameType
tag_namestring
dataReleasePayload

Returns

Promise<unknown>

Defined in

packages/pvm-types/lib/platform.ts:22