Skip to main content

Class: GithubPlatform

@pvm/plugin-github.GithubPlatform

Hierarchy

Constructors

constructor

new GithubPlatform(__namedParameters)

Parameters

NameType
__namedParametersObject
__namedParameters.configConfig

Overrides

PlatformInterface.constructor

Defined in

src/plugins/github/platform.ts:102

Properties

config

Private config: Config

Defined in

src/plugins/github/platform.ts:56


currentMr

currentMr: null | {} = null

Overrides

PlatformInterface.currentMr

Defined in

src/plugins/github/platform.ts:53


githubClient

Private githubClient: Octokit & {} & Api & {}

Defined in

src/plugins/github/platform.ts:54


githubRepoPath

Private githubRepoPath: Object

Type declaration

NameType
ownerstring
repostring

Defined in

src/plugins/github/platform.ts:55

Methods

addTag

addTag(ref, tag_name): Promise<unknown>

Parameters

NameType
refstring
tag_namestring

Returns

Promise<unknown>

Overrides

PlatformInterface.addTag

Defined in

src/plugins/github/platform.ts:214


addTagAndRelease

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

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

Parameters

NameType
refstring
tag_namestring
dataCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterface.addTagAndRelease

Defined in

src/plugins/github/platform.ts:222


beginMrAttribution

beginMrAttribution(): Promise<void>

Returns

Promise<void>

Overrides

PlatformInterface.beginMrAttribution

Defined in

src/plugins/github/platform.ts:196


createMrNote

createMrNote(noteBody): Promise<Object>

Parameters

NameType
noteBodystring

Returns

Promise<Object>

Overrides

PlatformInterface.createMrNote

Defined in

src/plugins/github/platform.ts:328


createProjectLabel

createProjectLabel(label, color): Promise<unknown>

Parameters

NameType
labelstring
colorstring

Returns

Promise<unknown>

Overrides

PlatformInterface.createProjectLabel

Defined in

src/plugins/github/platform.ts:362


createRelease

createRelease(tag_name, data): Promise<AlterReleaseResult>

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

Parameters

NameType
tag_namestring
dataCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterface.createRelease

Defined in

src/plugins/github/platform.ts:238


editRelease

editRelease(tag, data): Promise<AlterReleaseResult>

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

Parameters

NameType
tagstring
dataCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterface.editRelease

Defined in

src/plugins/github/platform.ts:259


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

fetchLatestSha(refName): Promise<string>

Parameters

NameType
refNamestring

Returns

Promise<string>

Overrides

PlatformInterface.fetchLatestSha

Defined in

src/plugins/github/platform.ts:386


findMrNote

findMrNote(kind): Promise<void | MetaComment<{} & { body: string }>>

Parameters

NameType
kindstring

Returns

Promise<void | MetaComment<{} & { body: string }>>

Overrides

PlatformInterface.findMrNote

Defined in

src/plugins/github/platform.ts:292


getCommitLink(commit): Promise<string>

Parameters

NameType
commitstring

Returns

Promise<string>

Overrides

PlatformInterface.getCommitLink

Defined in

src/plugins/github/platform.ts:378


getCommitSha

getCommitSha(): string

Returns

string

Overrides

PlatformInterface.getCommitSha

Defined in

src/plugins/github/platform.ts:396


getCurrentBranch

getCurrentBranch(): undefined | string

Returns

undefined | string

Overrides

PlatformInterface.getCurrentBranch

Defined in

src/plugins/github/platform.ts:382


getProjectLabels

getProjectLabels(): AsyncIterable<Object>

Returns

AsyncIterable<Object>

Overrides

PlatformInterface.getProjectLabels

Defined in

src/plugins/github/platform.ts:352


getRelease

getRelease(tagName): Promise<GetReleaseResult>

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

Parameters

NameType
tagNamestring

Returns

Promise<GetReleaseResult>

Overrides

PlatformInterface.getRelease

Defined in

src/plugins/github/platform.ts:129


getUpdateHintsByCommit

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

Parameters

NameType
_commitstring

Returns

Promise<null | Record<string, any>>

Overrides

PlatformInterface.getUpdateHintsByCommit

Defined in

src/plugins/github/platform.ts:400


logReleaseTag

Private logReleaseTag(tagName): void

Parameters

NameType
tagNamestring

Returns

void

Defined in

src/plugins/github/platform.ts:404


releaseTagsIterator

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

Returns

AsyncGenerator<PlatformReleaseTag, void, any>

Overrides

PlatformInterface.releaseTagsIterator

Defined in

src/plugins/github/platform.ts:169


releasesIterator

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

Returns

AsyncGenerator<VcsRelease, void, any>

Overrides

PlatformInterface.releasesIterator

Defined in

src/plugins/github/platform.ts:148


requireMr

requireMr(): Object

Returns

Object

Overrides

PlatformInterface.requireMr

Defined in

src/plugins/github/platform.ts:188


setMrLabels

setMrLabels(labels): Promise<unknown>

Parameters

NameType
labelsstring[]

Returns

Promise<unknown>

Overrides

PlatformInterface.setMrLabels

Defined in

src/plugins/github/platform.ts:370


setupClientHooks

Private setupClientHooks(): void

Returns

void

Defined in

src/plugins/github/platform.ts:117


syncAttachment

syncAttachment(_kind, _attachment, _opts): Promise<unknown>

Parameters

NameType
_kindstring
_attachmentBuffer
_optsany

Returns

Promise<unknown>

Overrides

PlatformInterface.syncAttachment

Defined in

src/plugins/github/platform.ts:348


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


updateMrNote

updateMrNote(commentId, noteBody): Promise<Object>

Parameters

NameType
commentIdnumber
noteBodystring

Returns

Promise<Object>

Overrides

PlatformInterface.updateMrNote

Defined in

src/plugins/github/platform.ts:338


upsertRelease

upsertRelease(tagName, data): Promise<AlterReleaseResult>

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

Parameters

NameType
tagNamestring
dataCreateReleasePayload

Returns

Promise<AlterReleaseResult>

Overrides

PlatformInterface.upsertRelease

Defined in

src/plugins/github/platform.ts:276


getAuthStrategy

Static getAuthStrategy(config): undefined | (options: StrategyOptions) => AuthInterface | StrategyInterface<[], [], Authentication>

Parameters

NameType
configConfig

Returns

undefined | (options: StrategyOptions) => AuthInterface | StrategyInterface<[], [], Authentication>

Defined in

src/plugins/github/platform.ts:58


getRepoUrlParts

Static getRepoUrlParts(cwd): Object

Parameters

NameType
cwdstring

Returns

Object

NameType
ownerstring
repostring

Defined in

src/plugins/github/platform.ts:80