|
| 1 | +/** |
| 2 | +* @license Apache-2.0 |
| 3 | +* |
| 4 | +* Copyright (c) 2023 The Stdlib Authors. |
| 5 | +* |
| 6 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | +* you may not use this file except in compliance with the License. |
| 8 | +* You may obtain a copy of the License at |
| 9 | +* |
| 10 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +* |
| 12 | +* Unless required by applicable law or agreed to in writing, software |
| 13 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | +* See the License for the specific language governing permissions and |
| 16 | +* limitations under the License. |
| 17 | +*/ |
| 18 | + |
| 19 | +'use strict'; |
| 20 | + |
| 21 | +/** |
| 22 | +* Custom prompt configuration. |
| 23 | +* |
| 24 | +* @name config |
| 25 | +* @type {Object |
| 26 | +*/ |
| 27 | +var config = { |
| 28 | + 'questions': {} |
| 29 | +}; |
| 30 | + |
| 31 | +/** |
| 32 | +* Question for selecting the commit type. |
| 33 | +* |
| 34 | +* @name type |
| 35 | +* @memberof config.questions |
| 36 | +* @type {Object} |
| 37 | +*/ |
| 38 | +config.questions[ 'type' ] = { |
| 39 | + 'description': 'Select the type of change that you\'re committing', |
| 40 | + 'enum': { |
| 41 | + 'feat': { |
| 42 | + 'description': 'A new feature', |
| 43 | + 'title': 'Features', |
| 44 | + 'emoji': '✨' |
| 45 | + }, |
| 46 | + 'fix': { |
| 47 | + 'description': 'A bug fix, including changes to the behavior of existing features and including changes that remove or mitigate security vulnerabilities', |
| 48 | + 'title': 'Bug Fixes', |
| 49 | + 'emoji': '🐛' |
| 50 | + }, |
| 51 | + 'remove': { |
| 52 | + 'description': 'A change that removes a feature', |
| 53 | + 'title': 'Removed Features', |
| 54 | + 'emoji': '🗑' |
| 55 | + }, |
| 56 | + 'deprecate': { |
| 57 | + 'description': 'A change that deprecates an existing feature', |
| 58 | + 'title': 'Deprecations', |
| 59 | + 'emoji': '⚠️' |
| 60 | + }, |
| 61 | + 'perf': { |
| 62 | + 'description': 'A change that improves performance', |
| 63 | + 'title': 'Performance Improvements', |
| 64 | + 'emoji': '🚀' |
| 65 | + }, |
| 66 | + 'docs': { |
| 67 | + 'description': 'Documentation-only change, including READMEs, JSDoc/Doxygen-style comments, source comments, annotations, and examples (including examples files) and excluding TypeScript declarations', |
| 68 | + 'title': 'Documentation', |
| 69 | + 'emoji': '📚' |
| 70 | + }, |
| 71 | + 'test': { |
| 72 | + 'description': 'Test-only change (e.g., adding missing tests or correcting existing tests)', |
| 73 | + 'title': 'Tests', |
| 74 | + 'emoji': '🚨' |
| 75 | + }, |
| 76 | + 'bench': { |
| 77 | + 'description': 'Benchmark-only change (e.g., adding missing benchmarks or correcting existing benchmarks)', |
| 78 | + 'title': 'Benchmarks', |
| 79 | + 'emoji': '⏱' |
| 80 | + }, |
| 81 | + 'build': { |
| 82 | + 'description': 'A change affecting how the project is built and released, including changes to automation and CI configuration files and scripts', |
| 83 | + 'title': 'Build Changes', |
| 84 | + 'emoji': '🛠' |
| 85 | + }, |
| 86 | + 'refactor': { |
| 87 | + 'description': 'A change that is neither a fix nor a feature (i.e., a change which does not affect behavior as experienced by downstream consumers', |
| 88 | + 'title': 'Code Refactoring', |
| 89 | + 'emoji': '🚧' |
| 90 | + }, |
| 91 | + 'style': { |
| 92 | + 'description': 'A change that improves code style (e.g., whitespace, formatting, semilcolons, etc) and does not affect the meaning of code', |
| 93 | + 'title': 'Style Updates', |
| 94 | + 'emoji': '💎' |
| 95 | + }, |
| 96 | + 'chore': { |
| 97 | + 'description': 'A change that is neither a fix, a feature, nor a refactor (i.e., a repetitive mechanical task, such as updating package meta data or updating external dependencies)', |
| 98 | + 'title': 'Chores', |
| 99 | + 'emoji': '🧺' |
| 100 | + }, |
| 101 | + 'temp': { |
| 102 | + 'description': 'A temporary, experimental, or exploratory change that is not intended to be permanent (e.g., as may be desired when debugging CI or when ad-hoc debugging on live systems)', |
| 103 | + 'title': 'Temporary Changes', |
| 104 | + 'emoji': '💡' |
| 105 | + }, |
| 106 | + 'revert': { |
| 107 | + 'description': 'Reverts a previous commit', |
| 108 | + 'title': 'Reverted Changes', |
| 109 | + 'emoji': '♻️' |
| 110 | + } |
| 111 | + } |
| 112 | +}; |
| 113 | + |
| 114 | +/** |
| 115 | +* Question for providing a short description. |
| 116 | +* |
| 117 | +* @name subject |
| 118 | +* @memberof config.questions |
| 119 | +* @type {Object} |
| 120 | +*/ |
| 121 | +config.questions[ 'subject' ] = { |
| 122 | + 'description': 'Write a short description of the change using the imperative mood' |
| 123 | +}; |
| 124 | + |
| 125 | +/** |
| 126 | +* Question for providing a long description. |
| 127 | +* |
| 128 | +* @name body |
| 129 | +* @memberof config.questions |
| 130 | +* @type {Object} |
| 131 | +*/ |
| 132 | +config.questions[ 'body' ] = { |
| 133 | + 'description': 'Provide a longer description of the change' |
| 134 | +}; |
| 135 | + |
| 136 | +/** |
| 137 | +* Question for indicating whether a change is breaking. |
| 138 | +* |
| 139 | +* @name isBreaking |
| 140 | +* @memberof config.questions |
| 141 | +* @type {Object} |
| 142 | +*/ |
| 143 | +config.questions[ 'isBreaking' ] = { |
| 144 | + 'description': 'Are there any breaking changes?' |
| 145 | +}; |
| 146 | + |
| 147 | +/** |
| 148 | +* Question for providing a short summary of a breaking change. |
| 149 | +* |
| 150 | +* @name breaking |
| 151 | +* @memberof config.questions |
| 152 | +* @type {Object} |
| 153 | +*/ |
| 154 | +config.questions[ 'breaking' ] = { |
| 155 | + 'description': 'Write a short description of the breaking change' |
| 156 | +}; |
| 157 | + |
| 158 | +/** |
| 159 | +* Question for providing a longer description of a breaking change. |
| 160 | +* |
| 161 | +* @name breakingCode |
| 162 | +* @memberof config.questions |
| 163 | +* @type {Object} |
| 164 | +*/ |
| 165 | +config.questions[ 'breakingCode' ] = { |
| 166 | + 'description': 'A BREAKING CHANGE commit should typically include a detailed description and migration instructions. If applicable, please enter a longer description' |
| 167 | +}; |
| 168 | + |
| 169 | +/** |
| 170 | +* Question for providing a short summary of a breaking change. |
| 171 | +* |
| 172 | +* @name breaking |
| 173 | +* @memberof config.questions |
| 174 | +* @type {Object} |
| 175 | +*/ |
| 176 | +config.questions[ 'breaking' ] = { |
| 177 | + 'description': 'Write a short description of the breaking change' |
| 178 | +}; |
| 179 | + |
| 180 | +/** |
| 181 | +* Question for indicating whether a change affects any issues. |
| 182 | +* |
| 183 | +* @name isIssueAffected |
| 184 | +* @memberof config.questions |
| 185 | +* @type {Object} |
| 186 | +*/ |
| 187 | +config.questions[ 'isIssueAffected' ] = { |
| 188 | + 'description': 'Does this change affect any issues?' |
| 189 | +}; |
| 190 | + |
| 191 | +/** |
| 192 | +* Question for listing issue references. |
| 193 | +* |
| 194 | +* @name issues |
| 195 | +* @memberof config.questions |
| 196 | +* @type {Object} |
| 197 | +*/ |
| 198 | +config.questions[ 'issues' ] = { |
| 199 | + 'description': 'Please list affected issues (e.g., "fix #123", "close #456", etc)' |
| 200 | +}; |
| 201 | + |
| 202 | + |
| 203 | +// EXPORTS // |
| 204 | + |
| 205 | +module.exports = config; |
0 commit comments