Update scripts

This commit is contained in:
Nick Cipollo
2019-12-12 18:46:17 -05:00
parent 7319d490c8
commit 455687cd65
6 changed files with 85 additions and 17 deletions

View File

@@ -27,6 +27,29 @@ class GithubReleases {
});
});
}
getByTag(tag) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.repos.getReleaseByTag({
owner: this.context.repo.owner,
repo: this.context.repo.repo,
tag: tag
});
});
}
update(id, tag, body, commitHash, draft, name) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.repos.updateRelease({
release_id: id,
body: body,
name: name,
draft: draft,
owner: this.context.repo.owner,
repo: this.context.repo.repo,
target_commitish: commitHash,
tag_name: tag
});
});
}
uploadArtifact(assetUrl, contentLength, contentType, file, name) {
return __awaiter(this, void 0, void 0, function* () {
return this.git.repos.uploadReleaseAsset({