{"id":19342776,"url":"https://github.com/chris-james/smart-commit","last_synced_at":"2025-02-24T08:44:29.109Z","repository":{"id":57363884,"uuid":"51971625","full_name":"Chris-James/smart-commit","owner":"Chris-James","description":"A Commitizen adapter to help Apprentices in the A100 program write their commit messages according to the program's required format.","archived":false,"fork":false,"pushed_at":"2016-09-29T18:41:57.000Z","size":52,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T03:34:57.911Z","etag":null,"topics":["commitizen","git-porcelain","javascript"],"latest_commit_sha":null,"homepage":"","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/Chris-James.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-18T02:16:55.000Z","updated_at":"2017-07-21T13:50:05.000Z","dependencies_parsed_at":"2022-09-16T17:01:48.859Z","dependency_job_id":null,"html_url":"https://github.com/Chris-James/smart-commit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-James%2Fsmart-commit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-James%2Fsmart-commit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-James%2Fsmart-commit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chris-James%2Fsmart-commit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chris-James","download_url":"https://codeload.github.com/Chris-James/smart-commit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240449795,"owners_count":19803123,"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":["commitizen","git-porcelain","javascript"],"created_at":"2024-11-10T03:36:10.787Z","updated_at":"2025-02-24T08:44:28.949Z","avatar_url":"https://github.com/Chris-James.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smart Commit\n[![Build Status](https://travis-ci.org/Chris-James/smart-commit.svg?branch=master)](https://travis-ci.org/Chris-James/smart-commit)\n\n## Introduction\n__Smart Commit__ is an adapter for [__Commitizen__](https://www.npmjs.com/package/commitizen).  \n\nCommitizen is a command line utility that formats Git commit messages by prompting the committer with questions.  \n\n## Setup\n\nIn order to use Smart Commit you must:\n* Install Commitizen globally.\n* Initialize Commitizen \u0026 the Smart Commit adapter in your repo.\n\nFirst, install Commitizen globally.\n```bash\nnpm install -g commitizen\n```\n\nNext, navigate into your project's directory and initialize Commitizen.  \n```bash\ncommitizen init smart-commit --save --save-exact\n```\n\nThis command installs the smart-commit adapter, saves it to your `package.json` dependencies or devDependencies, and adds the `config.commitizen` key:\n```JSON\n...\n  \"config\": {\n    \"commitizen\": {\n      \"path\": \"node_modules/smart-commit\"\n    }\n  }\n```\n\nAny developers (using Commitizen) that contribute to this repo will be shown the Smart Commit prompt.\n\n## Usage\n\n1. Type `git cz` instead of `git commit` when committing.\n1. Follow the instructions in the prompt.\n1. Review your formatted commit message and choose to **commit**, **edit**, or **cancel**.\n\n\u003e Choosing to edit your commit will open your formatted commit message in your default EDITOR.\n\n## Commit Message Format\n\nA commit message consists of three components:  \n- **Header** - The commit type, scope, \u0026 subject\n- **Body** - A more detailed description of the changes being committed\n- **Footer** - Breaking changes, issues closed, programming partners\n\nCommit messages are, generally, formatted as follows:\n```\n\u003ctype\u003e \u003cscope\u003e: \u003cSubject\u003e\n\n\u003cbody\u003e\n\nBREAKING-CHANGE:\n\n\u003cdescription\u003e\n\nCLOSES: \u003cissue\u003e\nPAIRED-WITH: \u003cName\u003e, ...\n```\n\n### Header\n\nThe header includes the commit's **type**, **scope**, and **subject**.  \n\nIt _must_ be less than 69 characters in length.\n\n\n#### Type\n\nThe type can only be one of the following:\n\n```\nfeature     A new feature.\nfix         A bug fix.\ndocs        A change to documentation or comments only.\nstyle       A change that does not affect the meaning of the code (white-space, alignment, etc).\nrefactor    A change that neither fixes a bug nor adds a feature.\ntune        A change that improves performance.\ntest        Add test(s).\nchore       A change to the build process, auxiliary tools, libraries, etc.\n```\n\n#### Scope\n\nThe commit's scope specifies the location of the changes. This could be a filename, function\nname, or some other identifier for the general area of the code being modified.\n\n#### Subject\n\nThe commit's subject is a succinct description of the changes being committed.\n\nIt should\n* Be \u003c= 50 characters long\n* Use the imperative, present tense (ie. \"Change\" not \"Changed\" nor \"Changes\").\n\nA subject **should not include a period (.)** at the end.\n\n\u003e #### Subject Length  \n\u003e Keeping subject lines at this length ensures that they are readable, and forces the author to think for a moment about the most concise way to explain what's going on.  \n\u003e\n\u003e Tip: If you're having a hard time summarizing, you might be committing too many changes at once.  \n\n\u003e #### Subject Tense  \n\u003e Imperative means \"spoken or written as if giving a command or instruction\".  \n\u003e\n\u003e A few examples:  \n\u003e * Clean the garage\n\u003e * Close the door  \n\u003e * Take out the trash  \n\u003e\n\u003e A properly formed Git commit subject line should always be able to complete the following sentence:  \n\u003e\n\u003e If applied, this commit will _your subject here_.\n\u003e\n\u003e[chris.beams.io](http://chris.beams.io/posts/git-commit/)\n\n#### Example Headers\n`docs README.md: Add setup instructions`\n\n`style userDashboard.js: Replace tabs with soft tabs (2 spaces)`\n\n`feat login(): Implement validation for login credentials`\n\n---\n### Body\n\nThe body is a detailed description of the change(s) being committed.  \n\nIt should:  \n* Explain the problem that the change tries to solve (i.e., What is wrong with the current code without the change?).\n* Justify the way the change solves the problem (i.e., Why the result with the change is better).\n* List alternate solutions considered but discarded, if any.\n\n#### Example Bodies\n\n```\nThe such-and-such in so-and-so file was returning data that was\nyada-yada-yada. This caused the fizz in buzz to woof.\n\nThis implements bingbang in such-and-such function in order to ensure\nthe data returned is bongo.\n```\n\n```\nThe blerg check in fleepflorp had an off by 1 error. This would cause\nit to access uninitialized memory if it was the last argument.\n\nAdding a fingle causes blerg to display an error message and the usage\nstring instead.\n```\n\n---\n### Footer\n\nThe message footer includes three optional components:\n- breaking changes introduced by the commit\n- issues closed by the commit\n- pair programming partners\n\n#### Example Footer\n\n```\nBREAKING-CHANGES:\n\nTemplates are now case-sensitive and use camelCase instead of kebab-case (dash-case).\n\nCLOSES: 276\nPAIRED-WITH: Jeremy Reston\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-james%2Fsmart-commit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchris-james%2Fsmart-commit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchris-james%2Fsmart-commit/lists"}