New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jira-precommit-hook

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jira-precommit-hook - npm Package Compare versions

Comparing version 0.0.4 to 0.1.0

8

lib/fs-utils.js

@@ -14,2 +14,3 @@ 'use strict';

exports.findParentFolder = findParentFolder;
exports.verifyHooksFolder = verifyHooksFolder;
exports.copyHookFiles = copyHookFiles;

@@ -51,2 +52,9 @@ exports.getFilePath = getFilePath;

function verifyHooksFolder(desiredHooksPath) {
if (!_fs2['default'].existsSync(desiredHooksPath)) {
console.log('Creating hooks directory in .git');
_fs2['default'].mkdirSync(desiredHooksPath);
}
}
function copyHookFiles(gitDirectory) {

@@ -53,0 +61,0 @@ var source = _path2['default'].join(__dirname, '../hooks/commit-msg');

'use strict';
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
var _fsUtilsJs = require('./fs-utils.js');
var _path = require('path');
var _path2 = _interopRequireDefault(_path);
var currentPath = process.cwd();

@@ -19,2 +25,5 @@

var hooksPath = _path2['default'].join(gitPath, 'hooks');
(0, _fsUtilsJs.verifyHooksFolder)(hooksPath);
(0, _fsUtilsJs.copyHookFiles)(gitPath).then(function () {

@@ -21,0 +30,0 @@ return console.log('Copied commit hook.');

4

lib/issue-strategies/index.js

@@ -32,5 +32,7 @@ 'use strict';

'Sub-task': storyStrat,
Maintenance: bugMtStrat,
'Maintenance Task': bugMtStrat,
'Deployment Task': bugMtStrat,
'Feature Defect': storyStrat,
Bug: bugMtStrat
};
module.exports = exports['default'];

@@ -38,3 +38,3 @@ 'use strict';

return _Promise.reject('Cannot find Epic Link Field.');
return _Promise.reject('Cannot find Epic Link Field ID. Should defined in field URI.');
});

@@ -68,2 +68,3 @@ }

case 'Sub-task':
case 'Feature Defect':
return jiraClient.findIssue(issue.fields.parent.key);

@@ -87,3 +88,3 @@

return parentKey ? jiraClient.findIssue(parentKey) : _Promise.reject('Cannot find parent from Epic ' + issue.key);
return parentKey ? jiraClient.findIssue(parentKey) : _Promise.reject('Cannot find initiative from Epic ' + issue.key + ' in issue links. Initiative should be linked by \'relates to\'.');

@@ -90,0 +91,0 @@ default:

{
"name": "jira-precommit-hook",
"version": "0.0.4",
"version": "0.1.0",
"description": "Git commit hook to verify commit messages are tagged with a JIRA issue number",

@@ -40,5 +40,6 @@ "main": "lib/index.js",

"mocha": "^2.2.4",
"rimraf": "^2.3.4",
"sinon": "^1.14.1",
"sinon-chai": "^2.7.0",
"sinon-as-promised": "^3.0.0"
"sinon-as-promised": "^3.0.0",
"sinon-chai": "^2.7.0"
},

@@ -45,0 +46,0 @@ "dependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc