Fix Releases bugs

This commit is contained in:
Nick Cipollo
2019-08-23 14:33:50 -04:00
parent a3db39da9a
commit 258c5b292a
4 changed files with 54 additions and 10 deletions

View File

@@ -7,10 +7,14 @@ async function run() {
const token = core.getInput('token');
const context = github.context
const git = new github.GitHub(token);
const release = new Releases(context, git)
const myInput = core.getInput('token');
core.debug(`Token ${myInput}`);
const releases = new Releases(context, git)
await releases.create()
.catch(error => {
core.warning(error)
})
.then(response => {
core.warning(`response: ${response}`)
})
} catch (error) {
core.setFailed(error.message);
}

View File

@@ -11,13 +11,13 @@ export class Releases {
this.git = git;
}
create(): Promise<Response<ReposCreateReleaseResponse>> {
this.context.ref
async create(): Promise<Response<ReposCreateReleaseResponse>> {
return this.git.repos.createRelease({
name: "Test release",
draft: true,
owner :this.context.repo.owner,
repo: this.context.repo.owner,
owner: this.context.repo.owner,
repo: this.context.repo.repo,
target_commitish: "master",
tag_name: "0.0.666"
})
}