Class: PlatformInterface<MergeRequest>
@pvm/vcs.PlatformInterface
Type parameters
Name |
---|
MergeRequest |
Hierarchy
PlatformInterface
Constructors
constructor
• new PlatformInterface<MergeRequest
>()
Type parameters
Name |
---|
MergeRequest |
Properties
currentMr
• currentMr: null
| MergeRequest
Defined in
packages/pvm-vcs/lib/platform-interface.ts:13
Methods
addTag
▸ Abstract
addTag(tag_name
, ref
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
tag_name | string |
ref | string |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:34
addTagAndRelease
▸ Abstract
addTagAndRelease(ref
, tag_name
, data
): Promise
<AlterReleaseResult
>
Создает и тег и релиз, если тег уже есть то выбрасывается исключение
Parameters
Name | Type |
---|---|
ref | string |
tag_name | string |
data | CreateReleasePayload |
Returns
Promise
<AlterReleaseResult
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:17
beginMrAttribution
▸ Abstract
beginMrAttribution(): void
Returns
void
Defined in
packages/pvm-vcs/lib/platform-interface.ts:29
createMrNote
▸ Abstract
createMrNote(body
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
body | string |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:41
createProjectLabel
▸ Abstract
createProjectLabel(label
, color
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
label | string |
color | string |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:45
createRelease
▸ Abstract
createRelease(tagName
, payload
): Promise
<AlterReleaseResult
>
Создает релиз на существующем теге
Parameters
Name | Type |
---|---|
tagName | string |
payload | CreateReleasePayload |
Returns
Promise
<AlterReleaseResult
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:19
editRelease
▸ Abstract
editRelease(tag_name
, data
): Promise
<AlterReleaseResult
>
Редактирует существующий релиз, если нет релиза или тега будет ошибка
Parameters
Name | Type |
---|---|
tag_name | string |
data | ReleasePayload |
Returns
Promise
<AlterReleaseResult
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:23
ensureMrLabels
▸ ensureMrLabels(labels
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
labels | string [] |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:62
fetchLatestSha
▸ Abstract
fetchLatestSha(refName
): Promise
<string
>
Parameters
Name | Type |
---|---|
refName | string |
Returns
Promise
<string
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:31
findMrNote
▸ Abstract
findMrNote(kind
): Promise
<void
| MetaComment
<Object
>>
Parameters
Name | Type |
---|---|
kind | string |
Returns
Promise
<void
| MetaComment
<Object
>>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:36
getCommitLink
▸ Abstract
getCommitLink(commit
): Promise
<null
| string
>
Parameters
Name | Type |
---|---|
commit | string |
Returns
Promise
<null
| string
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:15
getCommitSha
▸ Abstract
getCommitSha(): string
Returns
string
Defined in
packages/pvm-vcs/lib/platform-interface.ts:33
getCurrentBranch
▸ Abstract
getCurrentBranch(cwd
): undefined
| string
Parameters
Name | Type |
---|---|
cwd | string |
Returns
undefined
| string
Defined in
packages/pvm-vcs/lib/platform-interface.ts:32
getProjectLabels
▸ Abstract
getProjectLabels(): AsyncIterable
<Object
>
Returns
AsyncIterable
<Object
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:44
getRelease
▸ Abstract
getRelease(tagName
): Promise
<GetReleaseResult
>
Возвращает релиз, если есть, для существующего тега. Результат если тега нет или нет релиза отличается по коду ответа
Parameters
Name | Type |
---|---|
tagName | string |
Returns
Promise
<GetReleaseResult
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:21
getUpdateHintsByCommit
▸ Abstract
getUpdateHintsByCommit(commit
): Promise
<null
| Record
<string
, any
>>
Parameters
Name | Type |
---|---|
commit | string |
Returns
Promise
<null
| Record
<string
, any
>>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:48
releaseTagsIterator
▸ Abstract
releaseTagsIterator(): AsyncGenerator
<PlatformReleaseTag
, void
, any
>
Returns
AsyncGenerator
<PlatformReleaseTag
, void
, any
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:27
releasesIterator
▸ Abstract
releasesIterator(): AsyncGenerator
<VcsRelease
, void
, any
>
Returns
AsyncGenerator
<VcsRelease
, void
, any
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:26
requireMr
▸ Abstract
requireMr(): MergeRequest
Returns
MergeRequest
Defined in
packages/pvm-vcs/lib/platform-interface.ts:14
setMrLabels
▸ Abstract
setMrLabels(labels
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
labels | string [] |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:46
syncAttachment
▸ Abstract
syncAttachment(kind
, attachment
, opts
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
kind | string |
attachment | Buffer |
opts | any |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:28
syncText
▸ syncText(kind
, text
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
kind | string |
text | string |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:50
updateMrNote
▸ Abstract
updateMrNote(commentId
, body
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
commentId | string | number |
body | string |
Returns
Promise
<unknown
>
Defined in
packages/pvm-vcs/lib/platform-interface.ts:42
upsertRelease
▸ Abstract
upsertRelease(tag_name
, data
): Promise
<unknown
>
Редактирует или создает релиз, тег должен существовать
Parameters
Name | Type |
---|---|
tag_name | string |
data | ReleasePayload |
Returns
Promise
<unknown
>