├── .editorconfig ├── .eslintrc ├── .gitattributes ├── .gitignore ├── .mailmap ├── .stylelintrc ├── .travis.yml ├── AUTHORS ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── github-commit-limit.user.css ├── images └── commit-limit.png ├── package.json └── tools ├── authors ├── bump-version.js └── fix-perfectionist.js /.editorconfig: -------------------------------------------------------------------------------- 1 | # https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | trim_trailing_whitespace = true 8 | end_of_line = lf 9 | charset = utf-8 10 | insert_final_newline = true 11 | 12 | [*.css] 13 | block_comment_start = /* 14 | block_comment = * 15 | block_comment_end = */ 16 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | root: true 2 | extends: eslint-config-silverwind 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # lockfiles 2 | package-lock.json 3 | yarn.lock 4 | 5 | # temp stuff 6 | tmp/ 7 | *.tmp 8 | *.bak 9 | 10 | # logs 11 | *.stackdump 12 | *.log 13 | 14 | # Build 15 | node_modules/ 16 | build.json 17 | *.build.css 18 | 19 | # Windows crap 20 | Thumbs.db 21 | Desktop.ini 22 | 23 | # Mac crap 24 | .DS_Store 25 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Rob Garrison Mottie 2 | Rob Garrison Rob G 3 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | # https://github.com/stylelint/stylelint/blob/master/docs/user-guide/rules.md 2 | # https://github.com/stylelint/stylelint-config-standard/blob/master/index.js 3 | 4 | extends: stylelint-config-standard 5 | 6 | rules: 7 | at-rule-empty-line-before: null 8 | block-no-empty: null 9 | block-opening-brace-space-before: null 10 | color-hex-case: null 11 | color-named: null 12 | comment-empty-line-before: null 13 | comment-no-empty: null 14 | comment-whitespace-inside: null 15 | declaration-bang-space-before: null 16 | declaration-block-no-duplicate-properties: null 17 | declaration-block-single-line-max-declarations: null 18 | declaration-colon-newline-after: null 19 | font-family-name-quotes: always-where-recommended 20 | font-family-no-duplicate-names: true 21 | function-url-quotes: always 22 | indentation: null 23 | max-empty-lines: 0 24 | no-descending-specificity: null 25 | no-duplicate-selectors: null 26 | number-leading-zero: never 27 | number-max-precision: 3 28 | number-no-trailing-zeros: true 29 | rule-empty-line-before: null 30 | selector-combinator-space-after: null 31 | selector-combinator-space-before: null 32 | selector-list-comma-newline-after: null 33 | selector-pseudo-element-colon-notation: single 34 | selector-type-no-unknown: null 35 | string-quotes: double 36 | value-list-comma-newline-after: null 37 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - node 4 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | # Authors ordered by first contribution. 2 | 3 | Rob Garrison 4 | Salmanul Farzy 5 | 6 | # Generated by tools/authors.sh 7 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Version 2.0.2 (2018-11-30) 2 | 3 | * Apply commit limit to pull-request merge messages. 4 | * Meta: Fix perfectionist. 5 | 6 | ### Version 2.0.1 (2018-08-18) 7 | 8 | * Readme: 9 | * Move image to folder. 10 | * Add contributing section. 11 | * Meta: 12 | * Add contributing file. 13 | * Update dot files. 14 | * Add scripts. 15 | * Run clean script & add missing semi-colons. 16 | 17 | ### Version 2.0.0 (2018-07-24) 18 | 19 | * Switch file to `user.css`. 20 | * Readme: 21 | * Update issue link. 22 | * Add Stylus link & license. 23 | * Add link to Safari addon; then removed. 24 | * Add Stylus Firefox addon link. 25 | * Update info - remove Stylish addon. 26 | * Moved change log to separate file. 27 | 28 | ### Version 1.2.0 (2016-11-07) 29 | 30 | * Removed the "normal" input background color. It now sets the initial part of the gradient as a transparent background. See [GitHub Dark issue #429](https://github.com/StylishThemes/GitHub-Dark/issues/429). 31 | 32 | ### Version 1.1.0 (2016-08-05) 33 | 34 | * Style now includes the "normal" input background color. Use `#181818` to match the GitHub Dark background colors. 35 | 36 | ### Version 1.0.0 (2014-12-04) 37 | 38 | * Initial commit 39 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to GitHub Commit Limit 2 | 3 | 1. [Getting Involved](#getting-involved) 4 | 2. [How To Report style issues](#how-to-report-style-issues) 5 | 3. [Style Guide](#style-guide) 6 | 4. [Getting Started](#getting-started) 7 | 8 | ## Getting Involved 9 | 10 | There are a number of ways to get involved with the development of this GitHub Commit Limit theme. Even if you've never contributed to an Open Source project before, we're always looking for help identifying missing styles or other issues. 11 | 12 | ## How to Report Style issues 13 | 14 | ### I don't know CSS 15 | If you don't know CSS very well and have found a missing style, please include as much as possible of following information when opening an issue: 16 | 17 | * Screenshot of the problem; include the element(s) in the console if at all possible 18 | * To select an element, target it with your mouse then right-click and choose "Inspect Element" 19 | * Please include both the HTML view and the element with the problem in the screenshot (see [issue #119](https://github.com/StylishThemes/GitHub-Dark/issues/119) for an example from the GitHub-Dark repository) 20 | * A URL to the page (if public). 21 | 22 | ### I rock at CSS & GitHub! 23 | * Follow the style guide below 24 | * Make any needed changes, then send us a pull request 25 | * Please include a URL to the page (if public) 26 | 27 | ## Style Guide 28 | 29 | * Use the provided `.editorconfig` file with your code editor. Don't know what that is? Then check out http://editorconfig.org/. 30 | * Limit to the [K&R (KNF variation style)](https://en.wikipedia.org/wiki/Indentation_style#Variant:_BSD_KNF), and **2 SPACE INDENTATION** (no tabs, and not more, and not less than 2 spaces). 31 | 32 | * K&R - KNF Variation Example: 33 | ```css 34 | element[attr='value'] { 35 | ··property: value; 36 | } 37 | ``` 38 | 39 | * **Not Allman** 40 | ```css 41 | element[property='value'] 42 | { 43 | ··property: value; 44 | } 45 | ``` 46 | 47 | * Strict space between the `selector` and the `{`: 48 | ```css 49 | /* good */ 50 | element[attr='value'] { } 51 | 52 | /* bad */ 53 | element[attr='value']{ } 54 | ``` 55 | 56 | * 2 Space indentation 57 | ```css 58 | /* good */ 59 | ··property: value; 60 | 61 | /* bad */ 62 | ····property: value; 63 | ----property: value; 64 | ·property: value; 65 | ``` 66 | 67 | * Try to wrap lines at around 80 characters. 68 | * This style does not have a size limit, but: 69 | * Don't add any image URI's to the css; instead add the image into the `/images` directory; then point to using the following url: `http://StylishThemes.github.io/GitHub-Commit-Limit/images/{my-image.png}`. 70 | * If possible, reduce any added selectors. Remember that the style likely has an `!important` flag to override default styling, so a selector starting from the body isn't always necessary. 71 | * Don't add any inline comments. If you want to make a comment, add it as a note in the commit. 72 | * If your css definition already exists within the style, do not add it again! Add your selector to the existing definition. 73 | * Insert any new css selectors in any available slot before the style definition, or on a new line as needed. 74 | * If you want to add a new userstyle variable, please open an issue and discuss it with us first. 75 | 76 | ## Getting Started 77 | 78 | * [Download](https://github.com/StylishThemes/GitHub-Commit-Limit/archive/master.zip), [fork](https://github.com/StylishThemes/GitHub-Commit-Limit/fork) or clone this repository. 79 | * Use [node.js](http://nodejs.org/) to run `npm install`. 80 | * Make any changes to the `github-commit-limit.user.css` file and save. 81 | 82 | ### Build & test 83 | 84 | * Create & change into a new branch of your local GitHub Commit Limit repository. 85 | * Open the style in the Stylus editor, and make sure to have "live preview" checked for testing. 86 | * Once you are satisfied with the changes, select all the css (Ctrl + a), copy (Ctrl + c) then paste (Ctrl + v) it into your editor. 87 | * Run `npm test` to test the css changes. 88 | * Now you can add and commit the changes of the `github-commit-limit.user.css` file to your fork's branch. 89 | * If you haven't already contributed, then run `npm run authors` to add your name to our list of contributors :smile: 90 | * Push the changes to your branch, then submit a pull request. 91 | * And thanks again for contributing! 92 | 93 | ### Development Scripts 94 | 95 | * `npm run authors`: Runs a batch file to rebuild the `AUTHORS` file. Update the `.mailmap` file for any duplicate entries. 96 | * `npm run clean`: Runs the perfectionist script & cleans up after it. 97 | * `npm run eslint`: Lint the JavaScript code in the `tools` directory. 98 | * `npm run lint`: Run eslint & stylelint scripts. 99 | * `npm run major`: Creates a semantic major release. 100 | * `npm run minor`: Creates a semantic minor release. 101 | * `npm run patch`: Creates a semantic patch release. 102 | * `npm run perfectionist`: Runs perfectionist only. CSS is not cleaned! 103 | * `npm run stylelint`: Run stylelint on the css file. 104 | * `npm run test`: Same as `npm run lint`. 105 | * `npm run update`: Update development dependencies. 106 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Attribution-ShareAlike 4.0 International 2 | 3 | Creative Commons Corporation (“Creative Commons”) is not a law firm and does not 4 | provide legal services or legal advice. Distribution of Creative Commons public 5 | licenses does not create a lawyer-client or other relationship. Creative Commons 6 | makes its licenses and related information available on an “as-is” basis. 7 | Creative Commons gives no warranties regarding its licenses, any material 8 | licensed under their terms and conditions, or any related information. Creative 9 | Commons disclaims all liability for damages resulting from their use to the 10 | fullest extent possible. Using Creative Commons Public Licenses Creative Commons 11 | public licenses provide a standard set of terms and conditions that creators and 12 | other rights holders may use to share original works of authorship and other 13 | material subject to copyright and certain other rights specified in the public 14 | license below. The following considerations are for informational purposes only, 15 | are not exhaustive, and do not form part of our licenses. Considerations for 16 | licensors: Our public licenses are intended for use by those authorized to give 17 | the public permission to use material in ways otherwise restricted by copyright 18 | and certain other rights. Our licenses are irrevocable. Licensors should read 19 | and understand the terms and conditions of the license they choose before 20 | applying it. Licensors should also secure all rights necessary before applying 21 | our licenses so that the public can reuse the material as expected. Licensors 22 | should clearly mark any material not subject to the license. This includes other 23 | CC-licensed material, or material used under an exception or limitation to 24 | copyright. More considerations for licensors. Considerations for the public: By 25 | using one of our public licenses, a licensor grants the public permission to use 26 | the licensed material under specified terms and conditions. If the licensor’s 27 | permission is not necessary for any reason–for example, because of any 28 | applicable exception or limitation to copyright–then that use is not regulated 29 | by the license. Our licenses grant only permissions under copyright and certain 30 | other rights that a licensor has authority to grant. Use of the licensed 31 | material may still be restricted for other reasons, including because others 32 | have copyright or other rights in the material. A licensor may make special 33 | requests, such as asking that all changes be marked or described. Although not 34 | required by our licenses, you are encouraged to respect those requests where 35 | reasonable. More considerations for the public. 36 | 37 | Creative Commons Attribution-ShareAlike 4.0 International Public License 38 | 39 | By exercising the Licensed Rights (defined below), You accept and agree to be 40 | bound by the terms and conditions of this Creative Commons 41 | Attribution-ShareAlike 4.0 International Public License ("Public License"). To 42 | the extent this Public License may be interpreted as a contract, You are granted 43 | the Licensed Rights in consideration of Your acceptance of these terms and 44 | conditions, and the Licensor grants You such rights in consideration of benefits 45 | the Licensor receives from making the Licensed Material available under these 46 | terms and conditions. 47 | 48 | Section 1 – Definitions. 49 | 50 | a. Adapted Material means material subject to Copyright and Similar Rights that 51 | is derived from or based upon the Licensed Material and in which the Licensed 52 | Material is translated, altered, arranged, transformed, or otherwise modified in 53 | a manner requiring permission under the Copyright and Similar Rights held by the 54 | Licensor. For purposes of this Public License, where the Licensed Material is a 55 | musical work, performance, or sound recording, Adapted Material is always 56 | produced where the Licensed Material is synched in timed relation with a moving 57 | image. 58 | 59 | b. Adapter's License means the license You apply to Your Copyright and Similar 60 | Rights in Your contributions to Adapted Material in accordance with the terms 61 | and conditions of this Public License. 62 | 63 | c. BY-SA Compatible License means a license listed at 64 | creativecommons.org/compatiblelicenses, approved by Creative Commons as 65 | essentially the equivalent of this Public License. 66 | 67 | d. Copyright and Similar Rights means copyright and/or similar rights closely 68 | related to copyright including, without limitation, performance, broadcast, 69 | sound recording, and Sui Generis Database Rights, without regard to how the 70 | rights are labeled or categorized. For purposes of this Public License, the 71 | rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. 72 | 73 | e. Effective Technological Measures means those measures that, in the absence of 74 | proper authority, may not be circumvented under laws fulfilling obligations 75 | under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, 76 | and/or similar international agreements. 77 | 78 | f. Exceptions and Limitations means fair use, fair dealing, and/or any other 79 | exception or limitation to Copyright and Similar Rights that applies to Your use 80 | of the Licensed Material. 81 | 82 | g. License Elements means the license attributes listed in the name of a 83 | Creative Commons Public License. The License Elements of this Public License are 84 | Attribution and ShareAlike. 85 | 86 | h. Licensed Material means the artistic or literary work, database, or other 87 | material to which the Licensor applied this Public License. 88 | 89 | i. Licensed Rights means the rights granted to You subject to the terms and 90 | conditions of this Public License, which are limited to all Copyright and 91 | Similar Rights that apply to Your use of the Licensed Material and that the 92 | Licensor has authority to license. 93 | 94 | j. Licensor means the individual(s) or entity(ies) granting rights under this 95 | Public License. 96 | 97 | k. Share means to provide material to the public by any means or process that 98 | requires permission under the Licensed Rights, such as reproduction, public 99 | display, public performance, distribution, dissemination, communication, or 100 | importation, and to make material available to the public including in ways that 101 | members of the public may access the material from a place and at a time 102 | individually chosen by them. 103 | 104 | l. Sui Generis Database Rights means rights other than copyright resulting from 105 | Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 106 | on the legal protection of databases, as amended and/or succeeded, as well as 107 | other essentially equivalent rights anywhere in the world. 108 | 109 | m. You means the individual or entity exercising the Licensed Rights under this 110 | Public License. Your has a corresponding meaning. 111 | 112 | Section 2 – Scope. 113 | 114 | a. License grant. 115 | 116 | 1. Subject to the terms and conditions of this Public License, the Licensor 117 | hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, 118 | irrevocable license to exercise the Licensed Rights in the Licensed Material to: 119 | 120 | A. reproduce and Share the Licensed Material, in whole or in part; and 121 | 122 | B. produce, reproduce, and Share Adapted Material. 123 | 124 | 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and 125 | Limitations apply to Your use, this Public License does not apply, and You do 126 | not need to comply with its terms and conditions. 127 | 128 | 3. Term. The term of this Public License is specified in Section 6(a). 129 | 130 | 4. Media and formats; technical modifications allowed. The Licensor authorizes 131 | You to exercise the Licensed Rights in all media and formats whether now known 132 | or hereafter created, and to make technical modifications necessary to do so. 133 | The Licensor waives and/or agrees not to assert any right or authority to forbid 134 | You from making technical modifications necessary to exercise the Licensed 135 | Rights, including technical modifications necessary to circumvent Effective 136 | Technological Measures. For purposes of this Public License, simply making 137 | modifications authorized by this Section 2(a)(4) never produces Adapted 138 | Material. 139 | 140 | 5. Downstream recipients. 141 | 142 | A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed 143 | Material automatically receives an offer from the Licensor to exercise the 144 | Licensed Rights under the terms and conditions of this Public License. 145 | 146 | B. Additional offer from the Licensor – Adapted Material. Every recipient of 147 | Adapted Material from You automatically receives an offer from the Licensor to 148 | exercise the Licensed Rights in the Adapted Material under the conditions of the 149 | Adapter’s License You apply. 150 | 151 | C. No downstream restrictions. You may not offer or impose any additional or 152 | different terms or conditions on, or apply any Effective Technological Measures 153 | to, the Licensed Material if doing so restricts exercise of the Licensed Rights 154 | by any recipient of the Licensed Material. 155 | 156 | 6. No endorsement. Nothing in this Public License constitutes or may be 157 | construed as permission to assert or imply that You are, or that Your use of the 158 | Licensed Material is, connected with, or sponsored, endorsed, or granted 159 | official status by, the Licensor or others designated to receive attribution as 160 | provided in Section 3(a)(1)(A)(i). 161 | 162 | b. Other rights. 163 | 164 | 1. Moral rights, such as the right of integrity, are not licensed under this 165 | Public License, nor are publicity, privacy, and/or other similar personality 166 | rights; however, to the extent possible, the Licensor waives and/or agrees not 167 | to assert any such rights held by the Licensor to the limited extent necessary 168 | to allow You to exercise the Licensed Rights, but not otherwise. 169 | 170 | 2. Patent and trademark rights are not licensed under this Public License. 171 | 172 | 3. To the extent possible, the Licensor waives any right to collect royalties 173 | from You for the exercise of the Licensed Rights, whether directly or through a 174 | collecting society under any voluntary or waivable statutory or compulsory 175 | licensing scheme. In all other cases the Licensor expressly reserves any right 176 | to collect such royalties. 177 | 178 | Section 3 – License Conditions. 179 | 180 | Your exercise of the Licensed Rights is expressly made subject to the following 181 | conditions. 182 | 183 | a. Attribution. 184 | 185 | 1. If You Share the Licensed Material (including in modified form), You must: 186 | 187 | A. retain the following if it is supplied by the Licensor with the Licensed 188 | Material: 189 | 190 | i. identification of the creator(s) of the Licensed Material and any others 191 | designated to receive attribution, in any reasonable manner requested by the 192 | Licensor (including by pseudonym if designated); 193 | 194 | ii. a copyright notice; 195 | 196 | iii. a notice that refers to this Public License; 197 | 198 | iv. a notice that refers to the disclaimer of warranties; 199 | 200 | v. a URI or hyperlink to the Licensed Material to the extent reasonably 201 | practicable; 202 | 203 | B. indicate if You modified the Licensed Material and retain an indication of 204 | any previous modifications; and 205 | 206 | C. indicate the Licensed Material is licensed under this Public License, and 207 | include the text of, or the URI or hyperlink to, this Public License. 208 | 209 | 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner 210 | based on the medium, means, and context in which You Share the Licensed 211 | Material. For example, it may be reasonable to satisfy the conditions by 212 | providing a URI or hyperlink to a resource that includes the required 213 | information. 214 | 215 | 3. If requested by the Licensor, You must remove any of the information required 216 | by Section 3(a)(1)(A) to the extent reasonably practicable. 217 | 218 | b. ShareAlike.In addition to the conditions in Section 3(a), if You Share 219 | Adapted Material You produce, the following conditions also apply. 220 | 221 | 1. The Adapter’s License You apply must be a Creative Commons license with the 222 | same License Elements, this version or later, or a BY-SA Compatible License. 223 | 224 | 2. You must include the text of, or the URI or hyperlink to, the Adapter's 225 | License You apply. You may satisfy this condition in any reasonable manner based 226 | on the medium, means, and context in which You Share Adapted Material. 227 | 228 | 3. You may not offer or impose any additional or different terms or conditions 229 | on, or apply any Effective Technological Measures to, Adapted Material that 230 | restrict exercise of the rights granted under the Adapter's License You apply. 231 | 232 | Section 4 – Sui Generis Database Rights. 233 | 234 | Where the Licensed Rights include Sui Generis Database Rights that apply to Your 235 | use of the Licensed Material: 236 | 237 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, 238 | reuse, reproduce, and Share all or a substantial portion of the contents of the 239 | database; 240 | 241 | b. if You include all or a substantial portion of the database contents in a 242 | database in which You have Sui Generis Database Rights, then the database in 243 | which You have Sui Generis Database Rights (but not its individual contents) is 244 | Adapted Material, including for purposes of Section 3(b); and 245 | 246 | c. You must comply with the conditions in Section 3(a) if You Share all or a 247 | substantial portion of the contents of the database. For the avoidance of 248 | doubt, this Section 4 supplements and does not replace Your obligations under 249 | this Public License where the Licensed Rights include other Copyright and 250 | Similar Rights. 251 | 252 | Section 5 – Disclaimer of Warranties and Limitation of Liability. 253 | 254 | a. Unless otherwise separately undertaken by the Licensor, to the extent 255 | possible, the Licensor offers the Licensed Material as-is and as-available, and 256 | makes no representations or warranties of any kind concerning the Licensed 257 | Material, whether express, implied, statutory, or other. This includes, without 258 | limitation, warranties of title, merchantability, fitness for a particular 259 | purpose, non-infringement, absence of latent or other defects, accuracy, or the 260 | presence or absence of errors, whether or not known or discoverable. Where 261 | disclaimers of warranties are not allowed in full or in part, this disclaimer 262 | may not apply to You. 263 | 264 | b. To the extent possible, in no event will the Licensor be liable to You on any 265 | legal theory (including, without limitation, negligence) or otherwise for any 266 | direct, special, indirect, incidental, consequential, punitive, exemplary, or 267 | other losses, costs, expenses, or damages arising out of this Public License or 268 | use of the Licensed Material, even if the Licensor has been advised of the 269 | possibility of such losses, costs, expenses, or damages. Where a limitation of 270 | liability is not allowed in full or in part, this limitation may not apply to 271 | You. 272 | 273 | c. The disclaimer of warranties and limitation of liability provided above shall 274 | be interpreted in a manner that, to the extent possible, most closely 275 | approximates an absolute disclaimer and waiver of all liability. 276 | 277 | Section 6 – Term and Termination. 278 | 279 | a. This Public License applies for the term of the Copyright and Similar Rights 280 | licensed here. However, if You fail to comply with this Public License, then 281 | Your rights under this Public License terminate automatically. 282 | 283 | b. Where Your right to use the Licensed Material has terminated under Section 284 | 6(a), it reinstates: 285 | 286 | 1. automatically as of the date the violation is cured, provided it is cured 287 | within 30 days of Your discovery of the violation; or 288 | 289 | 2. upon express reinstatement by the Licensor. 290 | 291 | c. For the avoidance of doubt, this Section 6(b) does not affect any right the 292 | Licensor may have to seek remedies for Your violations of this Public License. 293 | 294 | d. For the avoidance of doubt, the Licensor may also offer the Licensed Material 295 | under separate terms or conditions or stop distributing the Licensed Material at 296 | any time; however, doing so will not terminate this Public License. 297 | 298 | e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. 299 | 300 | Section 7 – Other Terms and Conditions. 301 | 302 | a. The Licensor shall not be bound by any additional or different terms or 303 | conditions communicated by You unless expressly agreed. 304 | 305 | b. Any arrangements, understandings, or agreements regarding the Licensed 306 | Material not stated herein are separate from and independent of the terms and 307 | conditions of this Public License. 308 | 309 | Section 8 – Interpretation. 310 | 311 | a. For the avoidance of doubt, this Public License does not, and shall not be 312 | interpreted to, reduce, limit, restrict, or impose conditions on any use of the 313 | Licensed Material that could lawfully be made without permission under this 314 | Public License. 315 | 316 | b. To the extent possible, if any provision of this Public License is deemed 317 | unenforceable, it shall be automatically reformed to the minimum extent 318 | necessary to make it enforceable. If the provision cannot be reformed, it shall 319 | be severed from this Public License without affecting the enforceability of the 320 | remaining terms and conditions. 321 | 322 | c. No term or condition of this Public License will be waived and no failure to 323 | comply consented to unless expressly agreed to by the Licensor. 324 | 325 | d. Nothing in this Public License constitutes or may be interpreted as a 326 | limitation upon, or waiver of, any privileges and immunities that apply to the 327 | Licensor or You, including from the legal processes of any jurisdiction or 328 | authority. 329 | 330 | Creative Commons is not a party to its public licenses. Notwithstanding, 331 | Creative Commons may elect to apply one of its public licenses to material it 332 | publishes and in those instances will be considered the “Licensor.” Except for 333 | the limited purpose of indicating that material is shared under a Creative 334 | Commons public license or as otherwise permitted by the Creative Commons 335 | policies published at creativecommons.org/policies, Creative Commons does not 336 | authorize the use of the trademark “Creative Commons” or any other trademark or 337 | logo of Creative Commons without its prior written consent including, without 338 | limitation, in connection with any unauthorized modifications to any of its 339 | public licenses or any other arrangements, understandings, or agreements 340 | concerning use of licensed material. For the avoidance of doubt, this paragraph 341 | does not form part of the public licenses.

Creative Commons may be contacted at 342 | creativecommons.org. 343 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Commit Limit 2 | 3 | See http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html 4 | Here are some issues with making a change to a file online at GitHub: 5 | * To commit a change, you'll get a input for the commit title and a textarea for any additional details. 6 | * There is an alert that pops up when you go past 50 characters in the title, but shows nothing in the textarea. 7 | * These elements do not use a monospace font, nor do they show any indication as to where you should add a line break to maintain formatting 8 | This style was inspired by [this thread](https://github.com/torvalds/linux/pull/17) :heart: Linus 9 | 10 | ## Preview 11 | ![GitHub Commit Limit preview](images/commit-limit.png) 12 | 13 | ## Install 14 | 15 | A userstyle extension is required, common ones include: 16 | 17 | 🎨 Stylus for [Firefox](https://addons.mozilla.org/en-US/firefox/addon/styl-us/), [Chrome](https://chrome.google.com/webstore/detail/stylus/clngdbkpkpeebahjckkjfobafhncgmne) or [Opera](https://addons.opera.com/en-gb/extensions/details/stylus/).
18 | 🎨 xStyle for [Firefox](https://addons.mozilla.org/firefox/addon/xstyle/) or [Chrome](https://chrome.google.com/webstore/detail/xstyle/hncgkmhphmncjohllpoleelnibpmccpj). 19 | 20 | Then: 21 | 22 | 📦 [Install the usercss](https://raw.githubusercontent.com/StylishThemes/GitHub-Commit-Limit/master/github-commit-limit.user.css). Supports automatic updates.
23 | 📦 [Install from userstyles.org](https://userstyles.org/styles/130386). Does not support automatic updates & is NO LONGER UPDATED. 24 | 25 | ## Contributions 26 | 27 | If you would like to contribute to this repository, please... 28 | 29 | 1. 👓 Read the [contribution guidelines](CONTRIBUTING.md). 30 | 2. ![repo-forked](https://user-images.githubusercontent.com/136959/42383736-c4cb0db8-80fd-11e8-91ca-12bae108bccc.png) [fork](https://github.com/StylishThemes/GitHub-Commit-Limit/fork) or ![cloud-download](https://user-images.githubusercontent.com/136959/42401932-9ee9cae0-813d-11e8-8691-16e29a85d3b9.png) 31 | [Download](https://github.com/StylishThemes/GitHub-Commit-Limit/archive/master.zip), 32 | 3. 👌 Create a pull request! 33 | 34 | Thanks to all that have [contributed](AUTHORS) so far! 35 | -------------------------------------------------------------------------------- /github-commit-limit.user.css: -------------------------------------------------------------------------------- 1 | /* ==UserStyle== 2 | @name GitHub Commit Limit 3 | @version 2.0.2 4 | @description Show GitHub commit message limits 5 | @namespace github.com/StylishThemes 6 | @author StylishThemes 7 | @homepageURL https://github.com/StylishThemes/GitHub-Commit-Limit 8 | @supportURL https://github.com/StylishThemes/GitHub-Commit-Limit/issues 9 | @updateURL https://raw.githubusercontent.com/StylishThemes/GitHub-Commit-Limit/master/github-commit-limit.user.css 10 | @license CC-BY-SA-4.0 11 | @advanced color overlimit-color "Base color" #fdd 12 | @advanced text font-choice "Monospace Font" "Menlo" 13 | @preprocessor uso 14 | ==/UserStyle== */ 15 | @-moz-document domain("github.com") { 16 | :root { 17 | --overlimit-color: /*[[overlimit-color]]*/; 18 | --font-choice: /*[[font-choice]]*/; 19 | } 20 | /*! Github Commit Changes visual limts */ 21 | /* See http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html */ 22 | #commit-summary-input, #commit-description-textarea { 23 | font-family: var(--font-choice), 24 | Consolas, 25 | "Andale Mono WT", 26 | "Andale Mono", 27 | "Lucida Console", 28 | "Lucida Sans Typewriter", 29 | "DejaVu Sans Mono", 30 | "Bitstream Vera Sans Mono", 31 | "Liberation Mono", 32 | "Nimbus Mono L", 33 | Monaco, 34 | "Courier New", 35 | Courier, 36 | monospace !important; 37 | } 38 | /* add red block after 50 characters to show suggested limit */ 39 | #commit-summary-input, #merge_title_field { 40 | background-image: linear-gradient(to right, transparent 0%, transparent 51ch, var(--overlimit-color) 51ch) !important; 41 | } 42 | /* add red block after 72 characters to show suggested limit */ 43 | #commit-description-textarea, #merge_message_field { 44 | background-image: linear-gradient(to right, transparent 0%, transparent 73ch, var(--overlimit-color) 73ch) !important; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /images/commit-limit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StylishThemes/GitHub-Commit-Limit/68c8207ced8858cc7b12a53952e4b1542f9a3b67/images/commit-limit.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "github-commit-limit", 3 | "title": "GitHub commit limit", 4 | "version": "2.0.2", 5 | "description": "Show GitHub commit message limits", 6 | "license": "CC-BY-SA-4.0", 7 | "repository": "StylishThemes/GitHub-Commit-Limit", 8 | "homepage": "https://github.com/StylishThemes/GitHub-Commit-Limit", 9 | "main": "github-commit-limit.user.css", 10 | "engines": { 11 | "node": ">=10" 12 | }, 13 | "devDependencies": { 14 | "eslint": "^5.16.0", 15 | "eslint-config-silverwind": "^3.0.2", 16 | "perfectionist": "^2.4.0", 17 | "semver": "^6.1.1", 18 | "stylelint": "^10.0.1", 19 | "stylelint-config-standard": "^18.3.0", 20 | "updates": "^8.0.3" 21 | }, 22 | "scripts": { 23 | "authors": "bash tools/authors", 24 | "clean": "npm run perfectionist && node tools/fix-perfectionist.js", 25 | "eslint": "eslint --quiet --color tools/*.js", 26 | "lint": "npm run eslint && npm run stylelint", 27 | "major": "node tools/bump-version.js major && git add . && npm version -f major", 28 | "minor": "node tools/bump-version.js minor && git add . && npm version -f minor", 29 | "patch": "node tools/bump-version.js patch && git add . && npm version -f patch", 30 | "perfectionist": "perfectionist github-commit-limit.user.css github-commit-limit.user.css --indentSize 2 --maxAtRuleLength 250", 31 | "stylelint": "stylelint --color -- github-commit-limit.user.css", 32 | "test": "npm run eslint && npm run stylelint", 33 | "update": "updates -cu && npm install" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tools/authors: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # generate AUTHORS, modify .mailmap in case of duplicates 4 | git log --reverse --format='%aN <%aE>' | perl -we ' 5 | BEGIN { 6 | %seen = (), @authors = (); 7 | } 8 | while (<>) { 9 | next if $seen{$_}; 10 | $seen{$_} = push @authors, $_; 11 | } 12 | END { 13 | print "# Authors ordered by first contribution.\n"; 14 | print "\n", @authors, "\n"; 15 | print "# Generated by tools/authors.sh\n"; 16 | } 17 | ' > "${BASH_SOURCE%/*}/../AUTHORS" 18 | -------------------------------------------------------------------------------- /tools/bump-version.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | 4 | const fs = require("fs").promises; 5 | const path = require("path"); 6 | const semver = require("semver"); 7 | 8 | const pkg = require("../package.json"); 9 | 10 | const file = path.join(__dirname, "..", pkg.main); 11 | 12 | (async () => { 13 | // level = patch, minor or major 14 | const level = process.argv.pop(); 15 | const newVersion = semver.inc(pkg.version, level); 16 | 17 | fs.readFile(file, "utf8") 18 | .then(css => css.replace(pkg.version, newVersion)) 19 | .then((css) => { 20 | if (css.indexOf(newVersion) < 0) { 21 | throw new Error("*** VERSION MISMATCH!! ***"); 22 | } 23 | return css; 24 | }) 25 | .then(css => fs.writeFile(file, css)) 26 | .then(() => console.log("\x1b[32m%s\x1b[0m", `${pkg.title} usercss updated`)) 27 | .catch(exit); 28 | })(); 29 | 30 | function exit(err) { 31 | if (err) { 32 | console.error(err); 33 | } 34 | process.exit(err ? 1 : 0); 35 | } 36 | -------------------------------------------------------------------------------- /tools/fix-perfectionist.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | 4 | const fs = require("fs").promises; 5 | const path = require("path"); 6 | const pkg = require("../package.json"); 7 | 8 | const fileName = path.join(__dirname, "..", pkg.main); 9 | 10 | function cleanup(css) { 11 | return css 12 | // Perfectionist adds comments to the end of the previous line... 13 | // }/* comment */ => }\n\n /* comment */ 14 | .replace(/}\/\*(([\s\S])+?)\*\/\s*/g, "}\n\n /*$1*/\n ") 15 | .replace(/,\s\/\*/g, ",\n /*") 16 | // Remove extra carriage returns between definitions 17 | .replace(/\n+/g, "\n"); 18 | } 19 | 20 | async function postPerfectionist() { 21 | const css = await fs.readFile(fileName, "utf8"); 22 | await fs.writeFile(fileName, cleanup(css)); 23 | console.log("\x1b[32m%s\x1b[0m", `${pkg.title} usercss cleanup completed`); 24 | } 25 | 26 | postPerfectionist(); 27 | --------------------------------------------------------------------------------