Skip to content
Permalink
Browse files

fix(publisher): use updated node-github response API

Fixes: #156
  • Loading branch information
choxi authored and malept committed Mar 8, 2017
1 parent 84031ec commit 0f8e6c4f9e1b435da2b58e2364aa43f7bc1297d0
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/publishers/github.js
@@ -18,21 +18,21 @@ export default async (artifacts, packageJSON, forgeConfig, authToken, tag) => {
owner: forgeConfig.github_repository.owner,
repo: forgeConfig.github_repository.name,
per_page: 100,
})).find(testRelease => testRelease.tag_name === (tag || `v${packageJSON.version}`));
})).data.find(testRelease => testRelease.tag_name === (tag || `v${packageJSON.version}`));
if (!release) {
throw { code: 404 };
}
} catch (err) {
if (err.code === 404) {
// Release does not exist, let's make it
release = await github.getGitHub().repos.createRelease({
release = (await github.getGitHub().repos.createRelease({
owner: forgeConfig.github_repository.owner,
repo: forgeConfig.github_repository.name,
tag_name: tag || `v${packageJSON.version}`,
name: tag || `v${packageJSON.version}`,
draft: forgeConfig.github_repository.draft !== false,
prerelease: forgeConfig.github_repository.prerelease === true,
});
})).data;
} else {
// Unknown error
throw err;

0 comments on commit 0f8e6c4

Please sign in to comment.
You can’t perform that action at this time.