Skip to content

Commit

Permalink
Update dependencies and references (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
samueljoli authored Jul 26, 2019
1 parent 48e9708 commit c747ab6
Show file tree
Hide file tree
Showing 8 changed files with 3,273 additions and 1,582 deletions.
2 changes: 1 addition & 1 deletion lib/modules/changelog-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const generateChangelog = async function(comparedBranches, ownerRepo) {
}
const { number, labels } = searchResult.data.items[0];

let fauxContext = {
const fauxContext = {
client,
ownerRepo,
config: this.config
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/helpers/check-alias-labels.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'use strict';
const Hoek = require('hoek');
const Hoek = require('@hapi/hoek');

module.exports = function checkAliasLabels(label) {
let labelToReturn = '';
Expand Down
8 changes: 3 additions & 5 deletions lib/modules/helpers/hydrate-commit-entry.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
'use strict';
const Hoek = require('hoek');
const Hoek = require('@hapi/hoek');

module.exports = async function(commitMessage, issueNumber) {
const pullRequestNumber = new RegExp(/(\(#\d+\))/);
const numberToReplace = Hoek.reach(
commitMessage.match(pullRequestNumber),
'0'
);
let message;
let author;
const pullRequest = await this.client.pullRequests.get(Hoek.merge(this.ownerRepo, {number: issueNumber}));
message = commitMessage.replace(numberToReplace, `[${numberToReplace}](${pullRequest.data.url})`);
author = `[${pullRequest.data.user.login}](${pullRequest.data.user.url})`;
const message = commitMessage.replace(numberToReplace, `[${numberToReplace}](${pullRequest.data.url})`);
const author = `[${pullRequest.data.user.login}](${pullRequest.data.user.url})`;

return `${message} ${author}`;
};
2 changes: 1 addition & 1 deletion lib/modules/helpers/set-tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = function(tags) {
throw new Error('Tags should be set');
}

let [tag1, tag2] = tags || [];
const [tag1, tag2] = tags || [];

if (!tag1 || !tag2) {
throw new Error('Both Tags should be set');
Expand Down
Loading

0 comments on commit c747ab6

Please sign in to comment.