{"id":22287596,"url":"https://github.com/jessedobbelaere/jira-smart-commit","last_synced_at":"2025-07-28T22:32:11.059Z","repository":{"id":24881927,"uuid":"102672655","full_name":"jessedobbelaere/jira-smart-commit","owner":"jessedobbelaere","description":"A Node.js githook script that transforms commits into smart commits, prefixed with the JIRA issue tag.","archived":false,"fork":false,"pushed_at":"2023-04-19T03:08:52.000Z","size":116,"stargazers_count":13,"open_issues_count":11,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-09T01:09:45.125Z","etag":null,"topics":["githook","husky","jira","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jessedobbelaere.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-09-07T00:45:21.000Z","updated_at":"2022-03-08T22:08:26.000Z","dependencies_parsed_at":"2024-06-19T01:53:11.922Z","dependency_job_id":null,"html_url":"https://github.com/jessedobbelaere/jira-smart-commit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedobbelaere%2Fjira-smart-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedobbelaere%2Fjira-smart-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedobbelaere%2Fjira-smart-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessedobbelaere%2Fjira-smart-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessedobbelaere","download_url":"https://codeload.github.com/jessedobbelaere/jira-smart-commit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227961821,"owners_count":17847838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["githook","husky","jira","nodejs"],"created_at":"2024-12-03T17:00:44.912Z","updated_at":"2025-07-28T22:32:11.041Z","avatar_url":"https://github.com/jessedobbelaere.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JIRA Smart Commit\n\n![tests](https://github.com/jessedobbelaere/jira-smart-commit/workflows/run-tests/badge.svg)\n[![GitHub release](https://img.shields.io/github/release/jessedobbelaere/jira-smart-commit.svg)](https://github.com/jessedobbelaere/jira-smart-commit/releases/latest)\n[![Dependabot](https://img.shields.io/badge/dependabot-active-brightgreen?style=flat-square\u0026logo=dependabot)](https://dependabot.com)\n[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)\n[![Downloads](https://img.shields.io/npm/dt/jira-smart-commit.svg)](https://www.npmjs.com/package/jira-smart-commit)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com)\n\nA Node.js git hook script to prefix commits automatically with the JIRA ticket, based on a branch name.\n\n## Usage\n\n### Installation\n\n1. Install [Husky](https://www.npmjs.com/package/husky) in your project to configure Git hooks easily.\n\n```bash\nnpm install --save-dev husky\nnpx husky init\n```\n\n2. Install this package in your project:\n\n```bash\nnpm install --save-dev jira-smart-commit\n```\n\n3. Configure scripts in `package.json`. The script expects his first argument to be the JIRA tag of the project.\n\n```bash\n# .husky/commit-msg\nnpx jira-smart-commit YOUR_JIRA_ISSUE_KEY\n```\n\nAlternatively: use a regex to detect the Jira `ISSUE_KEY` in your branch.\n\n-   `TAG_MATCHER` - regular expression\n-   `TAG_MATCH_INDEX` - match index\n\nExample: if your branch names looke like `feature/JRA-1234/some-description` template\n\n```bash\n# .husky/commit-msg\nTAG_MATCHER=\\\"^[^/]+/(JRA-[0-9]+)\\\" TAG_MATCH_INDEX=1 npx jira-smart-commit\n```\n\n4. Commit with git like usual. If the branch was prefixed with a JIRA tag, your commit message will get a Jira prefix added with\n   the same tag.\n\n```\nBranch: JRA-411-husky-git-hooks\nCommit message: \"Add git hooks to project\" → \"JRA-411 Add git hooks to project\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedobbelaere%2Fjira-smart-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessedobbelaere%2Fjira-smart-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessedobbelaere%2Fjira-smart-commit/lists"}