Class: GitlabPlatform
@pvm/gitlab.GitlabPlatform
Hierarchy
PlatformInterfaceWithFileCommitApi
<MergeRequest
,CommitContext
>↳
GitlabPlatform
Constructors
constructor
• new GitlabPlatform(__namedParameters
)
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.config | Config |
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
Name | Type |
---|---|
commitContext | CommitContext |
file_paths | string [] |
Returns
void
Overrides
PlatformInterfaceWithFileCommitApi.addFiles
Defined in
packages/pvm-gitlab/platform.ts:217
addTag
▸ addTag(tag_name
, ref
, opts?
): Promise
<any
>
Parameters
Name | Type |
---|---|
tag_name | string |
ref | string |
opts | AddTagOptions |
Returns
Promise
<any
>
Overrides
PlatformInterfaceWithFileCommitApi.addTag
Defined in
packages/pvm-gitlab/platform.ts:292
addTagAndRelease
▸ addTagAndRelease(ref
, tag_name
, data
): Promise
<AlterReleaseResult
>
Создает и тег и релиз, если тег уже есть то выбрасывается исключение
Parameters
Name | Type |
---|---|
ref | string |
tag_name | string |
data | any |
Returns
Promise
<AlterReleaseResult
>
Overrides
PlatformInterfaceWithFileCommitApi.addTagAndRelease
Defined in
packages/pvm-gitlab/platform.ts:160
appendFile
▸ appendFile(commitContext
, file_path
, content
): Promise
<void
>
Parameters
Name | Type |
---|---|
commitContext | CommitContext |
file_path | string |
content | string |
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
Name | Type |
---|---|
commitContext | CommitContext |
message | string |
opts | CommitOptions |
Returns
Promise
<CommitResult
>
Overrides
PlatformInterfaceWithFileCommitApi.commit
Defined in
packages/pvm-gitlab/platform.ts:264
createMrNote
▸ createMrNote(body
): Promise
<void
>
Parameters
Name | Type |
---|---|
body | string |
Returns
Promise
<void
>
Overrides
PlatformInterfaceWithFileCommitApi.createMrNote
Defined in
packages/pvm-gitlab/platform.ts:99
createProjectLabel
▸ createProjectLabel(label
, color
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
label | string |
color | string |
Returns
Promise
<unknown
>
Overrides
PlatformInterfaceWithFileCommitApi.createProjectLabel
Defined in
packages/pvm-gitlab/platform.ts:84
createRelease
▸ createRelease(tag_name
, data
): Promise
<AlterReleaseResult
>
Создает релиз на существующем теге
Parameters
Name | Type |
---|---|
tag_name | string |
data | any |
Returns
Promise
<AlterReleaseResult
>
Overrides
PlatformInterfaceWithFileCommitApi.createRelease
Defined in
packages/pvm-gitlab/platform.ts:171
deleteFile
▸ deleteFile(commitContext
, file_path
): Promise
<void
>
Parameters
Name | Type |
---|---|
commitContext | CommitContext |
file_path | string |
Returns
Promise
<void
>
Overrides
PlatformInterfaceWithFileCommitApi.deleteFile
Defined in
packages/pvm-gitlab/platform.ts:241
editRelease
▸ editRelease(tag_name
, data
): Promise
<AlterReleaseResult
>
Редактирует существующий релиз, если нет релиза или тега будет ошибка
Parameters
Name | Type |
---|---|
tag_name | any |
data | any |
Returns
Promise
<AlterReleaseResult
>
Overrides
PlatformInterfaceWithFileCommitApi.editRelease
Defined in
packages/pvm-gitlab/platform.ts:182
ensureMrLabels
▸ ensureMrLabels(labels
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
labels | string [] |
Returns
Promise
<unknown
>
Inherited from
PlatformInterfaceWithFileCommitApi.ensureMrLabels
Defined in
packages/pvm-vcs/lib/platform-interface.ts:62
fetchLatestSha
▸ fetchLatestSha(refName
): Promise
<string
>
Parameters
Name | Type |
---|---|
refName | string |
Returns
Promise
<string
>
Overrides
PlatformInterfaceWithFileCommitApi.fetchLatestSha
Defined in
packages/pvm-gitlab/platform.ts:285
findMrNote
▸ findMrNote(kind
): Promise
<void
| MetaComment
<Object
>>
Parameters
Name | Type |
---|---|
kind | string |
Returns
Promise
<void
| MetaComment
<Object
>>
Overrides
PlatformInterfaceWithFileCommitApi.findMrNote
Defined in
packages/pvm-gitlab/platform.ts:91
getCommitLink
▸ getCommitLink(commit
): Promise
<string
>
Parameters
Name | Type |
---|---|
commit | string |
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
Name | Type |
---|---|
tagName | string |
Returns
Promise
<GetReleaseResult
>
Overrides
PlatformInterfaceWithFileCommitApi.getRelease
Defined in
packages/pvm-gitlab/platform.ts:121
getUpdateHintsByCommit
▸ getUpdateHintsByCommit(commit
): Promise
<null
| Record
<string
, any
>>
Parameters
Name | Type |
---|---|
commit | string |
Returns
Promise
<null
| Record
<string
, any
>>
Overrides
PlatformInterfaceWithFileCommitApi.getUpdateHintsByCommit
Defined in
packages/pvm-gitlab/platform.ts:317
logReleaseTag
▸ Private
logReleaseTag(tagName
): void
Parameters
Name | Type |
---|---|
tagName | string |
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
Overrides
PlatformInterfaceWithFileCommitApi.requireMr
Defined in
packages/pvm-gitlab/platform.ts:148
rollbackCommit
▸ rollbackCommit(_
): Promise
<void
>
Parameters
Name | Type |
---|---|
_ | CommitContext |
Returns
Promise
<void
>
Overrides
PlatformInterfaceWithFileCommitApi.rollbackCommit
Defined in
packages/pvm-gitlab/platform.ts:212
setMrLabels
▸ setMrLabels(labels
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
labels | string [] |
Returns
Promise
<unknown
>
Overrides
PlatformInterfaceWithFileCommitApi.setMrLabels
Defined in
packages/pvm-gitlab/platform.ts:72
syncAttachment
▸ syncAttachment(kind
, attachment
, opts?
): Promise
<HttpResponseSuccess
<any
>>
Parameters
Name | Type |
---|---|
kind | string |
attachment | Buffer |
opts | SyncAttachmentOpts |
Returns
Promise
<HttpResponseSuccess
<any
>>
Overrides
PlatformInterfaceWithFileCommitApi.syncAttachment
Defined in
packages/pvm-gitlab/platform.ts:200
syncText
▸ syncText(kind
, text
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
kind | string |
text | string |
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
Name | Type |
---|---|
commitContext | CommitContext |
file_path | string |
content | string |
Returns
Promise
<void
>
Overrides
PlatformInterfaceWithFileCommitApi.updateFile
Defined in
packages/pvm-gitlab/platform.ts:234
updateMrNote
▸ updateMrNote(commentId
, body
): Promise
<void
>
Parameters
Name | Type |
---|---|
commentId | number |
body | string |
Returns
Promise
<void
>
Overrides
PlatformInterfaceWithFileCommitApi.updateMrNote
Defined in
packages/pvm-gitlab/platform.ts:110
upsertRelease
▸ upsertRelease(tagName
, data
): Promise
<AlterReleaseResult
>
Редактирует или создает релиз, тег должен существовать
Parameters
Name | Type |
---|---|
tagName | string |
data | any |
Returns
Promise
<AlterReleaseResult
>
Overrides
PlatformInterfaceWithFileCommitApi.upsertRelease
Defined in
packages/pvm-gitlab/platform.ts:189
getPvmUpdateHintsFromString
▸ Static
getPvmUpdateHintsFromString(text
): null
| Record
<string
, any
>
Parameters
Name | Type |
---|---|
text | string |
Returns
null
| Record
<string
, any
>