Class: BasePlatformInterfaceWithFileCommitApi<TMergeRequest, TCommitContext>
@pvm/types.BasePlatformInterfaceWithFileCommitApi
Type parameters
Name |
---|
TMergeRequest |
TCommitContext |
Hierarchy
BasePlatformInterface
<TMergeRequest
>↳
BasePlatformInterfaceWithFileCommitApi
Implements
FileCommitApi
<TCommitContext
>
Constructors
constructor
• new BasePlatformInterfaceWithFileCommitApi<TMergeRequest
, TCommitContext
>()
Type parameters
Name |
---|
TMergeRequest |
TCommitContext |
Inherited from
BasePlatformInterface.constructor
Properties
currentMr
• currentMr: null
| TMergeRequest
= null
Inherited from
BasePlatformInterface.currentMr
Defined in
packages/pvm-types/lib/platform.ts:10
supportsFileCommitApi
• supportsFileCommitApi: boolean
= true
Defined in
packages/pvm-types/lib/platform.ts:53
Methods
addFiles
▸ Abstract
addFiles(commitContext
, filePaths
): void
Parameters
Name | Type |
---|---|
commitContext | TCommitContext |
filePaths | string [] |
Returns
void
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:55
addTag
▸ Abstract
addTag(tag_name
, ref
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
tag_name | string |
ref | string |
Returns
Promise
<unknown
>
Inherited from
Defined in
packages/pvm-types/lib/platform.ts:31
addTagAndRelease
▸ Abstract
addTagAndRelease(ref
, tag_name
, data
): Promise
<AlterReleaseResult
>
Создает и тег и релиз, если тег уже есть то выбрасывается исключение
Parameters
Name | Type |
---|---|
ref | string |
tag_name | string |
data | CreateReleasePayload |
Returns
Promise
<AlterReleaseResult
>
Inherited from
BasePlatformInterface.addTagAndRelease
Defined in
packages/pvm-types/lib/platform.ts:14
appendFile
▸ Abstract
appendFile(commitContext
, filePath
, content
): void
Parameters
Name | Type |
---|---|
commitContext | TCommitContext |
filePath | string |
content | string |
Returns
void
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:57
beginCommit
▸ Abstract
beginCommit(): TCommitContext
Returns
TCommitContext
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:59
beginMrAttribution
▸ Abstract
beginMrAttribution(): void
Returns
void
Inherited from
BasePlatformInterface.beginMrAttribution
Defined in
packages/pvm-types/lib/platform.ts:26
commit
▸ Abstract
commit(commitContext
, message
, opts?
): Promise
<CommitResult
>
Parameters
Name | Type |
---|---|
commitContext | TCommitContext |
message | string |
opts? | CommitOptions |
Returns
Promise
<CommitResult
>
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:61
createMrNote
▸ Abstract
createMrNote(body
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
body | string |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.createMrNote
Defined in
packages/pvm-types/lib/platform.ts:38
createProjectLabel
▸ Abstract
createProjectLabel(label
, color
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
label | string |
color | string |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.createProjectLabel
Defined in
packages/pvm-types/lib/platform.ts:42
createRelease
▸ Abstract
createRelease(tagName
, payload
): Promise
<AlterReleaseResult
>
Создает релиз на существующем теге
Parameters
Name | Type |
---|---|
tagName | string |
payload | CreateReleasePayload |
Returns
Promise
<AlterReleaseResult
>
Inherited from
BasePlatformInterface.createRelease
Defined in
packages/pvm-types/lib/platform.ts:16
deleteFile
▸ Abstract
deleteFile(commitContext
, file_path
): void
Parameters
Name | Type |
---|---|
commitContext | TCommitContext |
file_path | string |
Returns
void
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:63
editRelease
▸ Abstract
editRelease(tag_name
, data
): Promise
<AlterReleaseResult
>
Редактирует существующий релиз, если нет релиза или тега будет ошибка
Parameters
Name | Type |
---|---|
tag_name | string |
data | ReleasePayload |
Returns
Promise
<AlterReleaseResult
>
Inherited from
BasePlatformInterface.editRelease
Defined in
packages/pvm-types/lib/platform.ts:20
ensureMrLabels
▸ Abstract
ensureMrLabels(labels
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
labels | string [] |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.ensureMrLabels
Defined in
packages/pvm-types/lib/platform.ts:49
fetchLatestSha
▸ Abstract
fetchLatestSha(refName
): Promise
<string
>
Parameters
Name | Type |
---|---|
refName | string |
Returns
Promise
<string
>
Inherited from
BasePlatformInterface.fetchLatestSha
Defined in
packages/pvm-types/lib/platform.ts:28
findMrNote
▸ Abstract
findMrNote(kind
): Promise
<void
| MetaComment
<Object
>>
Parameters
Name | Type |
---|---|
kind | string |
Returns
Promise
<void
| MetaComment
<Object
>>
Inherited from
BasePlatformInterface.findMrNote
Defined in
packages/pvm-types/lib/platform.ts:33
getCommitLink
▸ Abstract
getCommitLink(commit
): Promise
<null
| string
>
Parameters
Name | Type |
---|---|
commit | string |
Returns
Promise
<null
| string
>
Inherited from
BasePlatformInterface.getCommitLink
Defined in
packages/pvm-types/lib/platform.ts:12
getCommitSha
▸ Abstract
getCommitSha(): string
Returns
string
Inherited from
BasePlatformInterface.getCommitSha
Defined in
packages/pvm-types/lib/platform.ts:30
getCurrentBranch
▸ Abstract
getCurrentBranch(cwd
): undefined
| string
Parameters
Name | Type |
---|---|
cwd | string |
Returns
undefined
| string
Inherited from
BasePlatformInterface.getCurrentBranch
Defined in
packages/pvm-types/lib/platform.ts:29
getProjectLabels
▸ Abstract
getProjectLabels(): AsyncIterable
<Object
>
Returns
AsyncIterable
<Object
>
Inherited from
BasePlatformInterface.getProjectLabels
Defined in
packages/pvm-types/lib/platform.ts:41
getRelease
▸ Abstract
getRelease(tagName
): Promise
<GetReleaseResult
>
Возвращает релиз, если есть, для существующего тега. Результат если тега нет или нет релиза отличается по коду ответа
Parameters
Name | Type |
---|---|
tagName | string |
Returns
Promise
<GetReleaseResult
>
Inherited from
BasePlatformInterface.getRelease
Defined in
packages/pvm-types/lib/platform.ts:18
getUpdateHintsByCommit
▸ Abstract
getUpdateHintsByCommit(commit
): Promise
<null
| Record
<string
, any
>>
Parameters
Name | Type |
---|---|
commit | string |
Returns
Promise
<null
| Record
<string
, any
>>
Inherited from
BasePlatformInterface.getUpdateHintsByCommit
Defined in
packages/pvm-types/lib/platform.ts:45
releaseTagsIterator
▸ Abstract
releaseTagsIterator(): AsyncGenerator
<PlatformReleaseTag
, void
, any
>
Returns
AsyncGenerator
<PlatformReleaseTag
, void
, any
>
Inherited from
BasePlatformInterface.releaseTagsIterator
Defined in
packages/pvm-types/lib/platform.ts:24
releasesIterator
▸ Abstract
releasesIterator(): AsyncGenerator
<VcsRelease
, void
, any
>
Returns
AsyncGenerator
<VcsRelease
, void
, any
>
Inherited from
BasePlatformInterface.releasesIterator
Defined in
packages/pvm-types/lib/platform.ts:23
requireMr
▸ Abstract
requireMr(): TMergeRequest
Returns
TMergeRequest
Inherited from
BasePlatformInterface.requireMr
Defined in
packages/pvm-types/lib/platform.ts:11
rollbackCommit
▸ Abstract
rollbackCommit(commitContext
): Promise
<void
>
Parameters
Name | Type |
---|---|
commitContext | TCommitContext |
Returns
Promise
<void
>
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:65
setMrLabels
▸ Abstract
setMrLabels(labels
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
labels | string [] |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.setMrLabels
Defined in
packages/pvm-types/lib/platform.ts:43
syncAttachment
▸ Abstract
syncAttachment(kind
, attachment
, opts
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
kind | string |
attachment | Buffer |
opts | any |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.syncAttachment
Defined in
packages/pvm-types/lib/platform.ts:25
syncText
▸ Abstract
syncText(kind
, text
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
kind | string |
text | string |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.syncText
Defined in
packages/pvm-types/lib/platform.ts:47
updateFile
▸ Abstract
updateFile(commitContext
, file_path
, content
): void
Parameters
Name | Type |
---|---|
commitContext | TCommitContext |
file_path | string |
content | string |
Returns
void
Implementation of
Defined in
packages/pvm-types/lib/platform.ts:67
updateMrNote
▸ Abstract
updateMrNote(commentId
, body
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
commentId | string | number |
body | string |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.updateMrNote
Defined in
packages/pvm-types/lib/platform.ts:39
upsertRelease
▸ Abstract
upsertRelease(tag_name
, data
): Promise
<unknown
>
Редактирует или создает релиз, тег должен существовать
Parameters
Name | Type |
---|---|
tag_name | string |
data | ReleasePayload |
Returns
Promise
<unknown
>
Inherited from
BasePlatformInterface.upsertRelease