contributing.json

Define what you want to enforce in a contributing.json file at your repository root. The file should have the same structure as the JSON to the right. Comments (// and /* */) are allowed.

If you're not interested in enforcing a certain rule, just omit it from your json file (i.e. there are no default values).

Click on one of the rules to learn more about it.

Want a rule that is not listed here? Please let us know!

            // contributing.json
            {
                "commit": {
                    "cannot_be_fixup": true,
            
                    // Subject is the first paragraph of the commit message.
                    "subject_cannot_be_empty": true,
                    "subject_must_be_longer_than": 4,
                    "subject_must_be_shorter_than": 101,
                    "subject_lines_must_be_shorter_than": 51,
                    "subject_must_be_single_line": true,
                    "subject_must_be_in_case": "lower",
                    "subject_must_be_in_tense": "imperative",
                    "subject_must_start_with_case": "lower",
                    "subject_must_end_with_dot": true,
                    "subject_must_not_end_with_dot": true,
                    "subject_must_include_prefix": {
                        "prefixes": ["feat", "fix", "docs", "refactor"],
                        "require_after_prefix": "(*): "
                    },
                    "subject_must_close_github_issue": true,
                    "subject_must_include_github_issue": true,
                    "subject_must_include_jira_issue": true,
            
                    // Body is the rest of the commit message after the first paragraph,
                    // separated by a blank line.
                    "body_cannot_be_empty": true,
                    "body_lines_must_be_shorter_than": 73,
                    "body_must_close_github_issue": true,
                    "body_must_include_github_issue": true,
                    "body_must_include_jira_issue": true
                },
            
                "pull_request": {
                    "subject_cannot_be_empty": true,
                    "subject_must_be_longer_than": 4,
                    "subject_must_be_shorter_than": 101,
                    "subject_must_be_in_tense": "imperative",
                    "subject_must_start_with_case": "upper",
                    "subject_must_end_with_dot": true,
                    "subject_must_not_end_with_dot": true,
                    "subject_must_include_prefix": {
                        "prefixes": ["feat", "fix", "docs", "refactor"],
                        "require_after_prefix": "(*): "
                    },
                    "subject_must_include_github_issue": true,
                    "subject_must_include_jira_issue": true,
            
                    "body_cannot_be_empty": true,
                    "body_must_include_verification_steps": true,
                    "body_must_include_screenshot": ["html", "css"],
                    "body_must_close_github_issue": true,
                    "body_must_include_github_issue": true,
                    "body_must_include_jira_issue": true
                },
            
                "issue": {
                    "subject_cannot_be_empty": true,
                    "subject_must_be_longer_than": 4,
                    "subject_must_be_shorter_than": 101,
                    "subject_must_be_in_tense": "imperative",
                    "subject_must_start_with_case": "upper",
                    "subject_must_end_with_dot": true,
                    "subject_must_not_end_with_dot": true,
                    "subject_must_include_prefix": {
                        "prefixes": ["feat", "fix", "docs", "refactor"],
                        "require_after_prefix": "(*): "
                    },
            
                    "body_cannot_be_empty": true,
                    "body_must_include_reproduction_steps": ["bug"],
            
                    "label_must_be_set": true
                },
            
                "branch": {
                    // The GitMagic service will enforce branch names in pull requests only.
                    "name_must_be_longer_than": 4,
                    "name_must_be_shorter_than": 256,
                    "name_must_include_prefix": {
                        "prefixes": ["feat", "fix", "docs", "refactor"],
                        "require_after_prefix": "/"
                    },
                    "name_must_include_github_issue": true,
                    "name_must_include_jira_issue": true
                }
            }