├── .eslintignore ├── NOTICE ├── .huskyrc.js ├── .github ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── changelog.yml │ └── npmpublish.yml ├── prettier.config.js ├── CODE_OF_CONDUCT.md ├── .editorconfig ├── lint-staged.config.js ├── .eslintrc.js ├── package.json ├── SETUP.md ├── .commit-msg ├── README.md ├── bin └── git-commit-template.js ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md └── LICENSE /.eslintignore: -------------------------------------------------------------------------------- 1 | # Ignore markdown files 2 | **/*.md 3 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Git Commit Template 2 | Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | -------------------------------------------------------------------------------- /.huskyrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | hooks: { 3 | "pre-commit": "lint-staged", 4 | "prepare-commit-msg": "./bin/git-commit-template.js", 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | *Issue #, if available:* 2 | 3 | *Description of changes:* 4 | 5 | 6 | By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. 7 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | /* globals module */ 2 | // Since this module is set to use es6 thus module is giving error. Thus 3 | // defining module as global before hand 4 | module.exports = { 5 | trailingComma: "es5", 6 | tabWidth: 2, 7 | arrowParens: "always", 8 | proseWrap: "always", 9 | }; 10 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # top-most EditorConfig file 2 | root = true 3 | 4 | # Unix-style newlines with a newline ending every file 5 | [*] 6 | end_of_line = lf 7 | insert_final_newline = true 8 | 9 | # 2 space indentation 10 | indent_style = space 11 | indent_size = 2 12 | 13 | # Set default charset 14 | [*.{js,jsx,ts,tsx}] 15 | charset = utf-8 16 | -------------------------------------------------------------------------------- /lint-staged.config.js: -------------------------------------------------------------------------------- 1 | // Since this module is set to use es6 thus module is giving error. Thus 2 | // defining module as global before hand 3 | module.exports = { 4 | "*.{js,json,md}": [ 5 | "npm run lint:files", 6 | // Assuming prettier doesn't add any linting issues 7 | "prettier --write", 8 | // Checking if anything broke because of prettier 9 | "npm run lint:files", 10 | ], 11 | }; 12 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | commonjs: true, 4 | es6: true, 5 | node: true, 6 | }, 7 | extends: "eslint:recommended", 8 | globals: { 9 | Atomics: "readonly", 10 | SharedArrayBuffer: "readonly", 11 | }, 12 | parserOptions: { 13 | ecmaVersion: 2018, 14 | }, 15 | plugins: ["json"], 16 | rules: { 17 | indent: ["error", 2, { SwitchCase: 1 }], 18 | "linebreak-style": ["error", "unix"], 19 | quotes: ["error", "double"], 20 | semi: ["error", "always"], 21 | "no-console": "off", 22 | curly: "warn", 23 | "arrow-parens": ["error", "always"], 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "git-commit-template", 3 | "version": "1.0.5", 4 | "description": "Set commit template for git packages", 5 | "bin": { 6 | "git-commit-template": "./bin/git-commit-template.js" 7 | }, 8 | "scripts": { 9 | "test": "echo \"No test specified yet.\" && exit 0", 10 | "lint:files": "eslint" 11 | }, 12 | "engines": { 13 | "node": ">=8" 14 | }, 15 | "peerDependencies": { 16 | "husky": ">1.x" 17 | }, 18 | "keywords": [ 19 | "git", 20 | "javascript", 21 | "husky", 22 | "commit", 23 | "hooks" 24 | ], 25 | "author": "anshulguleria@ymail.com", 26 | "license": "Apache 2.0", 27 | "devDependencies": { 28 | "eslint": "^7.2.0", 29 | "eslint-plugin-json": "^2.1.1", 30 | "husky": "^2.3.0", 31 | "lint-staged": "^10.2.9", 32 | "prettier": "^1.17.1" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /.github/workflows/changelog.yml: -------------------------------------------------------------------------------- 1 | name: changelog 2 | 3 | on: 4 | pull_request: 5 | types: [closed] 6 | 7 | release: 8 | types: [published] 9 | 10 | issues: 11 | types: [closed, edited] 12 | 13 | jobs: 14 | generate_changelog: 15 | runs-on: ubuntu-latest 16 | name: Generate changelog for master branch 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - name: Generate changelog 21 | uses: charmixer/auto-changelog-action@v1 22 | with: 23 | token: ${{ secrets.GITHUB_TOKEN }} 24 | 25 | - name: Commit files 26 | env: 27 | CI_USER: "CHANGELOG Bot" 28 | CI_EMAIL: "noreply@github.com" 29 | run: | 30 | git config --local user.email "$CI_EMAIL" 31 | git config --local user.name "$CI_USER" 32 | git add CHANGELOG.md 33 | git commit -m '[BOT] 🤖 Updated CHANGELOG.md' && echo ::set-env name=push::1 || echo "No changes to CHANGELOG.md" 34 | 35 | - name: Push changes 36 | # This will be true if we are able to commit changes 37 | if: env.push == 1 38 | env: 39 | CI_USER: "CHANGELOG Bot" 40 | CI_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | run: | 42 | git push "https://$CI_USER:$CI_TOKEN@github.com/$GITHUB_REPOSITORY.git" HEAD:master 43 | -------------------------------------------------------------------------------- /SETUP.md: -------------------------------------------------------------------------------- 1 | ## Setup project: 2 | 3 | For setting up of the project you only need `npm` and `git`. 4 | 5 | Once you have forked and cloned the repository move to the package directory and 6 | run `npm` install: 7 | 8 | ```bash 9 | cd git-commit-template 10 | npm install 11 | ``` 12 | 13 | ## Testing the change 14 | 15 | This git commit tempalte uses itself to set the commit tmeplate using husky. So 16 | once you are done with your changes in the template just say `git add .` and 17 | `git commit`, you should be showed the message you changed. 18 | 19 | If things are not to your satishfaction then just reject the commit by deleting 20 | all the message and change the template. 21 | 22 | ## Releasing the changes: 23 | 24 | We use [github actions](https://github.com/features/actions) to automate the 25 | release process. Our current hook is on release create, this means when the 26 | created tag is released. 27 | 28 | Steps: 29 | 30 | 1. Make your changes(don't forget to up the package version [patch|minor|major] 31 | and raise a pull request. You can use 32 | `npm --no-git-tag-version version [major|minor|patch]` command to 33 | automatically update these versions. 34 | 2. Once the changes are merged if you have write permissions on the 35 | [repository](https://github.com/amzn/git-commit-template) you can create a 36 | tag ad push it. 37 | 38 | ```bash 39 | # create tag 40 | git tag v<> 41 | 42 | # push tags 43 | git push --tags 44 | ``` 45 | 46 | 3. After pushing the tags head over to releases section and go to tags tab. For 47 | the tag that you created if you click on ellipsis you will see an options to 48 | create a release. 49 | 4. Provide proper message and create a release. After this our github actions 50 | will take over and publish the master branch to npm repository. 51 | -------------------------------------------------------------------------------- /.commit-msg: -------------------------------------------------------------------------------- 1 | [FEATURE | BUG | DOCS | CHORE] One liner 2 | # One liner describing the change(<=50 chars) 3 | 4 | # FEATURE: When you are adding new feature then use this tag. Usually this 5 | # updates minor version for non-breaking change and major version for breaking 6 | # change. Command: `npm version minor` or `npm version major` 7 | # 8 | # BUG: When you are fixing an issue in the repository. Usually this changes the 9 | # patch version of the package. Command: `npm version patch` 10 | # 11 | # DOCS: When you are updating the documentation for the package. This is also a 12 | # patch version change as this does not breaks anything 13 | # 14 | # CHORE: When you are doing some minor code re-adjustments for re-factoring 15 | # which does not changes any interface or fixes any bug. This is also a patch 16 | # version change. 17 | 18 | # Description (<= 72 chars) 19 | # Should reach max 72 characters before wrapping to new 20 | # line. Keep this section descriptive. 21 | Describe the issue you are facing and how you solved it with the 22 | proposed changes. 23 | 24 | [TESTING] 25 | 26 | # Explain the how you tested the change. If possible also provide links 27 | # where your working solution is hosted so that reviewer can test it. 28 | How you tested this change. 29 | 30 | closes: #ISSUE_NUMBER 31 | 32 | # If you want to close multiple issues you can do: 33 | 34 | # closes: #ISSUE_NUMBER1 35 | 36 | # closes: #ISSUE_NUMBER2 37 | 38 | # Closes issue in another repository 39 | # closes: username/repository#ISSUE_NUMBER 40 | 41 | # For full list of available syntax and options you can read github 42 | # documentation on 43 | # [closing-issues-using-keywords](https://help.github.com/en/articles/closing-issues-using-keywords). 44 | 45 | # This is the default autogenerated template by git-commit-template 46 | # package. For more info read package documentation at 47 | # https://github.com/amzn/git-commit-template 48 | -------------------------------------------------------------------------------- /.github/workflows/npmpublish.yml: -------------------------------------------------------------------------------- 1 | # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages 3 | 4 | name: publish 5 | 6 | on: 7 | release: 8 | types: [created] 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | - uses: actions/setup-node@v1 16 | with: 17 | node-version: 12 18 | - run: npm ci 19 | - run: npm test 20 | 21 | publish-npm: 22 | needs: build 23 | runs-on: ubuntu-latest 24 | steps: 25 | - uses: actions/checkout@v2 26 | - uses: actions/setup-node@v1 27 | with: 28 | node-version: 12 29 | registry-url: https://registry.npmjs.org/ 30 | - run: npm ci 31 | # This will tell npm to publish your scoped package with public access. 32 | - run: npm publish --access public 33 | env: 34 | NODE_AUTH_TOKEN: ${{secrets.npm_token}} 35 | 36 | 37 | # Disabled job 38 | publish-gpr: 39 | # This doesn't work and read 40 | # https://github.com/actions/setup-node/issues/73#issuecomment-599199211 41 | # to know why. Github package repository doens't work for package 42 | # which are not scoped hence not publishing 43 | # Hence, disabling it 44 | if: 1 == 0 45 | needs: build 46 | runs-on: ubuntu-latest 47 | steps: 48 | - uses: actions/checkout@v2 49 | - uses: actions/setup-node@v1 50 | with: 51 | node-version: 12 52 | registry-url: https://npm.pkg.github.com/ 53 | - run: npm ci 54 | # Read https://joeattardi.codes/2019-11-16-github-package/ to know more 55 | # about this hack. I think the above issue should explain this 56 | - run: echo registry=https://npm.pkg.github.com/amzn >> $NPM_CONFIG_USERCONFIG 57 | - run: npm publish 58 | env: 59 | NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} 60 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # git-commit-template 2 | 3 | ![npm 4 | publish](https://github.com/amzn/git-commit-template/workflows/publish/badge.svg) 5 | ![changelog](https://github.com/amzn/git-commit-template/workflows/changelog/badge.svg) 6 | 7 | Sets commit template for your git projects. This is a husky plugin which should 8 | be used on `prepare-commit-msg` hook exposed by git. 9 | 10 | When we do git commits we usually follow a practice for the commit message, this 11 | package aims to streamline that practice by providing you a standard template to 12 | follow. It also enables you to set your own standard template. With this plugin 13 | setup, next time when you do `git commit` you will get the standard template for 14 | commit message set for you. 15 | 16 | ## Install 17 | 18 | For installing this plugin you need [husky](https://github.com/typicode/husky) 19 | `>= 1.x`. Use npm to install this plugin to your package: 20 | 21 | ```bash 22 | npm i --save-dev git-commit-template husky@1 23 | ``` 24 | 25 | > Note: We have tested the plugin with husky@1 but you can try with higher 26 | > versions too if that works for you 27 | 28 | It exposes a cli command with name `git-commit-template` which you can use in 29 | your husky configuration. For example: 30 | 31 | ```javascript 32 | // .huskyrc.js 33 | module.exports = { 34 | hooks: { 35 | "prepare-commit-msg": "git-commit-template", 36 | }, 37 | }; 38 | ``` 39 | 40 | ## `git-commit-template` command 41 | 42 | This command takes an optional parameter of your commit message file name. If 43 | provided, then it will read the file provided by you, otherwise uses its default 44 | configuration file. Read [`.commit-msg`](.commit-msg) file to see the default 45 | configuration added by us. 46 | 47 | Sample for providing file name: 48 | 49 | ```javascript 50 | // .huskyrc.js 51 | module.exports = { 52 | hooks: { 53 | "prepare-commit-msg": "git-commit-template .my-custom-git-msg-file", 54 | }, 55 | }; 56 | ``` 57 | 58 | > Note: This hooks provides you default commit message only if you haven't 59 | > provided any yet. This means that this plugin will not add message if you are 60 | > amending your commit(`git commit --amend`) or using interactive rebase 61 | > (`git rebase -i HEAD~3`). 62 | 63 | ## License 64 | 65 | This library is licensed under the Apache 2.0 License. 66 | -------------------------------------------------------------------------------- /bin/git-commit-template.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Script to set our template as commit message template. This depends on husky 5 | * parameters $HUSKY_GIT_PARAMS which gives me the git commit message template 6 | * being used for commit message. By default this is ./git/COMMIT_MSG file 7 | */ 8 | 9 | /** 10 | * Here we are using only the first parameter of $HUSKY_GIT_PARAMS variable i.e. 11 | * the commit message file. We will update that file with our template file 12 | * content 13 | */ 14 | 15 | /** 16 | * Usage examples: 17 | * Add this script in your hooks section of husky. We require 1.x version of 18 | * husky so this will not work for 0.x version of husky. 19 | * 20 | * Example: 21 | * ```javascript 22 | * // .huskyrc.js 23 | * module.exports = { 24 | * hooks: { 25 | * "prepare-commit-msg": "git-commit-template .gitmessage", 26 | * }, 27 | * }; 28 | * 29 | * ``` 30 | */ 31 | 32 | const fs = require("fs"); 33 | const path = require("path"); 34 | const COMMIT_MSG_FILE_NAME = ".commit-msg"; 35 | 36 | // Default template file but will be overridden with input argument if provided 37 | let templateFile = path.join(__dirname, `../${COMMIT_MSG_FILE_NAME}`); 38 | 39 | /** 40 | * If we have 3rd argument i.e. file name then use that as template 41 | * e.g. 42 | * ./bin/setup-template.js .gitmessage 43 | * // Then argv will look like this: 44 | * argv = [ "node", "./bin/setup-template.js", ".gitmessage" ] 45 | */ 46 | if (process.argv[2]) { 47 | templateFile = path.join(process.cwd(), process.argv[2]); 48 | } 49 | 50 | /** 51 | * Sample git params are [ "./git/COMMIT_MSG", "commit", "HEAD" ] in case of 52 | * --amend flag 53 | */ 54 | const gitParams = process.env["HUSKY_GIT_PARAMS"].split(" "); 55 | 56 | /** 57 | * We are running our logic only in case of empty commit message. In other 58 | * scenarios commit message would already be present and no longer needs our 59 | * template thus skip it. 60 | */ 61 | if (gitParams.length === 1) { 62 | const commitMsgFile = gitParams[0]; 63 | 64 | let gitFileContent = fs.readFileSync(commitMsgFile, { encoding: "utf8" }); 65 | const templateFileContent = fs.readFileSync(templateFile, { 66 | encoding: "utf8", 67 | }); 68 | 69 | gitFileContent = templateFileContent + gitFileContent; 70 | 71 | fs.writeFileSync(commitMsgFile, gitFileContent, { encoding: "utf8" }); 72 | } 73 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/vim,node,macos 3 | # Edit at https://www.gitignore.io/?templates=vim,node,macos 4 | 5 | ### macOS ### 6 | # General 7 | .DS_Store 8 | .AppleDouble 9 | .LSOverride 10 | 11 | # Icon must end with two \r 12 | Icon 13 | 14 | # Thumbnails 15 | ._* 16 | 17 | # Files that might appear in the root of a volume 18 | .DocumentRevisions-V100 19 | .fseventsd 20 | .Spotlight-V100 21 | .TemporaryItems 22 | .Trashes 23 | .VolumeIcon.icns 24 | .com.apple.timemachine.donotpresent 25 | 26 | # Directories potentially created on remote AFP share 27 | .AppleDB 28 | .AppleDesktop 29 | Network Trash Folder 30 | Temporary Items 31 | .apdisk 32 | 33 | ### Node ### 34 | # Logs 35 | logs 36 | *.log 37 | npm-debug.log* 38 | yarn-debug.log* 39 | yarn-error.log* 40 | lerna-debug.log* 41 | 42 | # Diagnostic reports (https://nodejs.org/api/report.html) 43 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 44 | 45 | # Runtime data 46 | pids 47 | *.pid 48 | *.seed 49 | *.pid.lock 50 | 51 | # Directory for instrumented libs generated by jscoverage/JSCover 52 | lib-cov 53 | 54 | # Coverage directory used by tools like istanbul 55 | coverage 56 | 57 | # nyc test coverage 58 | .nyc_output 59 | 60 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 61 | .grunt 62 | 63 | # Bower dependency directory (https://bower.io/) 64 | bower_components 65 | 66 | # node-waf configuration 67 | .lock-wscript 68 | 69 | # Compiled binary addons (https://nodejs.org/api/addons.html) 70 | build/Release 71 | 72 | # Dependency directories 73 | node_modules/ 74 | jspm_packages/ 75 | 76 | # TypeScript v1 declaration files 77 | typings/ 78 | 79 | # Optional npm cache directory 80 | .npm 81 | 82 | # Optional eslint cache 83 | .eslintcache 84 | 85 | # Optional REPL history 86 | .node_repl_history 87 | 88 | # Output of 'npm pack' 89 | *.tgz 90 | 91 | # Yarn Integrity file 92 | .yarn-integrity 93 | 94 | # dotenv environment variables file 95 | .env 96 | .env.test 97 | 98 | # parcel-bundler cache (https://parceljs.org/) 99 | .cache 100 | 101 | # next.js build output 102 | .next 103 | 104 | # nuxt.js build output 105 | .nuxt 106 | 107 | # vuepress build output 108 | .vuepress/dist 109 | 110 | # Serverless directories 111 | .serverless/ 112 | 113 | # FuseBox cache 114 | .fusebox/ 115 | 116 | # DynamoDB Local files 117 | .dynamodb/ 118 | 119 | ### Vim ### 120 | # Swap 121 | [._]*.s[a-v][a-z] 122 | [._]*.sw[a-p] 123 | [._]s[a-rt-v][a-z] 124 | [._]ss[a-gi-z] 125 | [._]sw[a-p] 126 | 127 | # Session 128 | Session.vim 129 | 130 | # Temporary 131 | .netrwhist 132 | *~ 133 | # Auto-generated tag files 134 | tags 135 | # Persistent undo 136 | [._]*.un~ 137 | 138 | # End of https://www.gitignore.io/api/vim,node,macos 139 | 140 | 141 | # Our custom ignores 142 | build 143 | # From idea editor 144 | *.iml 145 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [Unreleased](https://github.com/amzn/git-commit-template/tree/HEAD) 4 | 5 | [Full Changelog](https://github.com/amzn/git-commit-template/compare/v1.0.5...HEAD) 6 | 7 | **Merged pull requests:** 8 | 9 | - Bump lodash from 4.17.15 to 4.17.19 [\#17](https://github.com/amzn/git-commit-template/pull/17) ([dependabot[bot]](https://github.com/apps/dependabot)) 10 | 11 | ## [v1.0.5](https://github.com/amzn/git-commit-template/tree/v1.0.5) (2020-06-11) 12 | 13 | [Full Changelog](https://github.com/amzn/git-commit-template/compare/v1.0.4...v1.0.5) 14 | 15 | **Merged pull requests:** 16 | 17 | - \[BUG\] Fixs changelog for pull\_request close event [\#14](https://github.com/amzn/git-commit-template/pull/14) ([anshulguleria](https://github.com/anshulguleria)) 18 | 19 | ## [v1.0.4](https://github.com/amzn/git-commit-template/tree/v1.0.4) (2020-06-11) 20 | 21 | [Full Changelog](https://github.com/amzn/git-commit-template/compare/v1.0.3...v1.0.4) 22 | 23 | **Merged pull requests:** 24 | 25 | - \[BUG\] Fixes push on tag publish [\#13](https://github.com/amzn/git-commit-template/pull/13) ([anshulguleria](https://github.com/anshulguleria)) 26 | 27 | ## [v1.0.3](https://github.com/amzn/git-commit-template/tree/v1.0.3) (2020-06-11) 28 | 29 | [Full Changelog](https://github.com/amzn/git-commit-template/compare/v1.0.2...v1.0.3) 30 | 31 | **Closed issues:** 32 | 33 | - Generate changelog for changes published [\#11](https://github.com/amzn/git-commit-template/issues/11) 34 | 35 | **Merged pull requests:** 36 | 37 | - \[FEATURE\] Adds action to generate changelog [\#12](https://github.com/amzn/git-commit-template/pull/12) ([anshulguleria](https://github.com/anshulguleria)) 38 | - \[BUG\] Updates dependencies for security fixes [\#10](https://github.com/amzn/git-commit-template/pull/10) ([anshulguleria](https://github.com/anshulguleria)) 39 | 40 | ## [v1.0.2](https://github.com/amzn/git-commit-template/tree/v1.0.2) (2020-04-03) 41 | 42 | [Full Changelog](https://github.com/amzn/git-commit-template/compare/v1.0.1...v1.0.2) 43 | 44 | **Merged pull requests:** 45 | 46 | - \[CHORE\] Updates action name and docs for setup [\#9](https://github.com/amzn/git-commit-template/pull/9) ([anshulguleria](https://github.com/anshulguleria)) 47 | 48 | ## [v1.0.1](https://github.com/amzn/git-commit-template/tree/v1.0.1) (2020-04-03) 49 | 50 | [Full Changelog](https://github.com/amzn/git-commit-template/compare/26e4df7b5d03f890e29c0b8634a39ce86da9ce38...v1.0.1) 51 | 52 | **Merged pull requests:** 53 | 54 | - \[CHORE\] Fixes issue with gpr publish [\#8](https://github.com/amzn/git-commit-template/pull/8) ([anshulguleria](https://github.com/anshulguleria)) 55 | - Bump mixin-deep from 1.3.1 to 1.3.2 [\#7](https://github.com/amzn/git-commit-template/pull/7) ([dependabot[bot]](https://github.com/apps/dependabot)) 56 | - Bump acorn from 6.1.1 to 6.4.1 [\#6](https://github.com/amzn/git-commit-template/pull/6) ([dependabot[bot]](https://github.com/apps/dependabot)) 57 | - Bump lodash from 4.17.11 to 4.17.15 [\#4](https://github.com/amzn/git-commit-template/pull/4) ([dependabot[bot]](https://github.com/apps/dependabot)) 58 | - Bump eslint-utils from 1.3.1 to 1.4.2 [\#3](https://github.com/amzn/git-commit-template/pull/3) ([dependabot[bot]](https://github.com/apps/dependabot)) 59 | - \[CHORE\] Updates package publish name [\#2](https://github.com/amzn/git-commit-template/pull/2) ([anshulguleria](https://github.com/anshulguleria)) 60 | - \[FEATURE\] Adds code for setting commit template [\#1](https://github.com/amzn/git-commit-template/pull/1) ([anshulguleria](https://github.com/anshulguleria)) 61 | 62 | 63 | 64 | \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)* 65 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing Guidelines 2 | 3 | Thank you for your interest in contributing to our project. Whether it's a bug 4 | report, new feature, correction, or additional documentation, we greatly value 5 | feedback and contributions from our community. 6 | 7 | Please read through this document before submitting any issues or pull requests 8 | to ensure we have all the necessary information to effectively respond to your 9 | bug report or contribution. 10 | 11 | ## Reporting Bugs/Feature Requests 12 | 13 | We welcome you to use the GitHub issue tracker to report bugs or suggest 14 | features. 15 | 16 | When filing an issue, please check 17 | [existing open](https://github.com/amzn/git-commit-template/issues), or 18 | [recently closed](https://github.com/amzn/git-commit-template/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), 19 | issues to make sure somebody else hasn't already reported the issue. Please try 20 | to include as much information as you can. Details like these are incredibly 21 | useful: 22 | 23 | - A reproducible test case or series of steps 24 | - The version of our code being used 25 | - Any modifications you've made relevant to the bug 26 | - Anything unusual about your environment or deployment 27 | 28 | ## Contributing via Pull Requests 29 | 30 | Contributions via pull requests are much appreciated. Before sending us a pull 31 | request, please ensure that: 32 | 33 | 1. You are working against the latest source on the _master_ branch. 34 | 2. You check existing open, and recently merged, pull requests to make sure 35 | someone else hasn't addressed the problem already. 36 | 3. You open an issue to discuss any significant work - we would hate for your 37 | time to be wasted. 38 | 39 | To send us a pull request, please: 40 | 41 | 1. Fork the repository. 42 | 2. Modify the source; please focus on the specific change you are contributing. 43 | If you also reformat all the code, it will be hard for us to focus on your 44 | change. 45 | 3. Ensure local tests pass. 46 | 4. Commit to your fork using clear commit messages. 47 | 5. Send us a pull request, answering any default questions in the pull request 48 | interface. 49 | 6. Pay attention to any automated CI failures reported in the pull request, and 50 | stay involved in the conversation. 51 | 52 | GitHub provides additional document on 53 | [forking a repository](https://help.github.com/articles/fork-a-repo/) and 54 | [creating a pull request](https://help.github.com/articles/creating-a-pull-request/). 55 | 56 | ## Setting up project: 57 | 58 | Once you have forked and cloned the repository go ahead to 59 | [setup.md](./SETUP.md) file to know how to setup and test the repository. 60 | 61 | ## Finding contributions to work on 62 | 63 | Looking at the existing issues is a great way to find something to contribute 64 | on. As our projects, by default, use the default GitHub issue labels 65 | (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 66 | ['help wanted'](https://github.com/amzn/git-commit-template/labels/help%20wanted) 67 | issues is a great place to start. 68 | 69 | ## Code of Conduct 70 | 71 | This project has adopted the 72 | [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). For 73 | more information see the 74 | [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 75 | opensource-codeofconduct@amazon.com with any additional questions or comments. 76 | 77 | ## Security issue notifications 78 | 79 | If you discover a potential security issue in this project we ask that you 80 | notify AWS/Amazon Security via our 81 | [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). 82 | Please do **not** create a public github issue. 83 | 84 | ## Licensing 85 | 86 | See the 87 | [LICENSE](https://github.com/amzn/git-commit-template/blob/master/LICENSE) file 88 | for our project's licensing. We will ask you to confirm the licensing of your 89 | contribution. 90 | 91 | We may ask you to sign a 92 | [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) 93 | for larger changes. 94 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | --------------------------------------------------------------------------------