Fixes #19 Bump dependencies & update octokit usage
This commit is contained in:
@@ -6,6 +6,7 @@ class GithubReleases {
|
||||
this.git = git;
|
||||
}
|
||||
async create(tag, body, commitHash, draft, name, prerelease) {
|
||||
// noinspection TypeScriptValidateJSTypes
|
||||
return this.git.repos.createRelease({
|
||||
body: body,
|
||||
name: name,
|
||||
@@ -25,7 +26,7 @@ class GithubReleases {
|
||||
});
|
||||
}
|
||||
async listArtifactsForRelease(releaseId) {
|
||||
return this.git.repos.listAssetsForRelease({
|
||||
return this.git.repos.listReleaseAssets({
|
||||
owner: this.context.repo.owner,
|
||||
release_id: releaseId,
|
||||
repo: this.context.repo.repo
|
||||
@@ -45,6 +46,7 @@ class GithubReleases {
|
||||
});
|
||||
}
|
||||
async update(id, tag, body, commitHash, draft, name, prerelease) {
|
||||
// noinspection TypeScriptValidateJSTypes
|
||||
return this.git.repos.updateRelease({
|
||||
release_id: id,
|
||||
body: body,
|
||||
@@ -57,15 +59,18 @@ class GithubReleases {
|
||||
tag_name: tag
|
||||
});
|
||||
}
|
||||
async uploadArtifact(assetUrl, contentLength, contentType, file, name) {
|
||||
async uploadArtifact(assetUrl, contentLength, contentType, file, name, releaseId) {
|
||||
return this.git.repos.uploadReleaseAsset({
|
||||
url: assetUrl,
|
||||
headers: {
|
||||
"content-length": contentLength,
|
||||
"content-type": contentType
|
||||
},
|
||||
file: file,
|
||||
name: name
|
||||
data: file,
|
||||
name: name,
|
||||
owner: this.context.repo.owner,
|
||||
release_id: releaseId,
|
||||
repo: this.context.repo.repo
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user