Skip to content

Commit

Permalink
Fix release script params params checks and handle tagger data.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed Dec 3, 2018
1 parent 3238c01 commit a574736
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 7 additions & 5 deletions scripts/release/plugins/github/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ module.exports = (pluginConfig = {}) => {
target_commitish: config.branch
};

let tagger = {};
let tagger = null;

// Get current user to construct proper tagger data.
try {
const user = await github.users.getAuthenticated({});
tagger = {
name: user.data.name,
email: user.data.email
};
if (user && user.data && user.data.email) {
tagger = {
name: user.data.name,
email: user.data.email
};
}
} catch (e) {
logger.error(e.message);
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/utils/buildParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = async config => {
logger: config.logger || logger(),
git,
config: {
preview: config.preview || false,
ci: config.ci || true,
preview: config.hasOwnProperty("preview") ? config.preview : false,
ci: config.hasOwnProperty("ci") ? config.ci : true,
branch: config.branch || "master",
tagFormat: config.tagFormat || "v<%= version %>",
registryUrl: config.registryUrl || "https://registry.npmjs.org",
Expand Down

0 comments on commit a574736

Please sign in to comment.