|
| 1 | +# For more configuration information, please see https://coordt.github.io/generate-changelog/ |
| 2 | + |
| 3 | +# User variables for reference in other parts of the configuration. |
| 4 | +variables: |
| 5 | + repo_url: https://github.com/callowayproject/bump-my-version |
| 6 | + changelog_filename: CHANGELOG.md |
| 7 | + |
| 8 | +# Pipeline to find the most recent tag for incremental changelog generation. |
| 9 | +# Leave empty to always start at first commit. |
| 10 | +starting_tag_pipeline: |
| 11 | + - action: ReadFile |
| 12 | + kwargs: |
| 13 | + filename: "{{ changelog_filename }}" |
| 14 | + - action: FirstRegExMatch |
| 15 | + kwargs: |
| 16 | + pattern: (?im)^## (?P<rev>\d+\.\d+(?:\.\d+)?)\s+\(\d+-\d{2}-\d{2}\)$ |
| 17 | + named_subgroup: rev |
| 18 | + |
| 19 | +# Used as the version title of the changes since the last valid tag. |
| 20 | +unreleased_label: Unreleased |
| 21 | + |
| 22 | +# Process the commit's first line for use in the changelog. |
| 23 | +summary_pipeline: |
| 24 | + - action: strip_spaces |
| 25 | + - action: Strip |
| 26 | + comment: Get rid of any periods so we don't get double periods |
| 27 | + kwargs: |
| 28 | + chars: . |
| 29 | + - action: SetDefault |
| 30 | + args: |
| 31 | + - no commit message |
| 32 | + - action: capitalize |
| 33 | + - action: append_dot |
| 34 | + |
| 35 | +# Process the commit's body for use in the changelog. |
| 36 | +body_pipeline: |
| 37 | + - action: ParseTrailers |
| 38 | + comment: Parse the trailers into metadata. |
| 39 | + kwargs: |
| 40 | + commit_metadata: save_commit_metadata |
| 41 | + |
| 42 | +# Process and store the full or partial changelog. |
| 43 | +output_pipeline: |
| 44 | + - action: IncrementalFileInsert |
| 45 | + kwargs: |
| 46 | + filename: "{{ changelog_filename }}" |
| 47 | + last_heading_pattern: (?im)^## \d+\.\d+(?:\.\d+)?\s+\([0-9]+-[0-9]{2}-[0-9]{2}\)$ |
| 48 | + |
| 49 | +# Full or relative paths to look for output generation templates. |
| 50 | +template_dirs: |
| 51 | + - ".github/changelog_templates/" |
| 52 | + |
| 53 | +# Group the commits within a version by these commit attributes. |
| 54 | +group_by: |
| 55 | + - metadata.category |
| 56 | + |
| 57 | +# Only tags matching this regular expression are used for the changelog. |
| 58 | +tag_pattern: ^[0-9]+\.[0-9]+(?:\.[0-9]+)?$ |
| 59 | + |
| 60 | +# Tells ``git-log`` whether to include merge commits in the log. |
| 61 | +include_merges: false |
| 62 | + |
| 63 | +# Ignore commits whose summary line matches any of these regular expression patterns. |
| 64 | +ignore_patterns: |
| 65 | + - '[@!]minor' |
| 66 | + - '[@!]cosmetic' |
| 67 | + - '[@!]refactor' |
| 68 | + - '[@!]wip' |
| 69 | + - ^$ |
| 70 | + - ^Merge branch |
| 71 | + - ^Merge pull |
| 72 | + - ^Version updated |
| 73 | + |
| 74 | +# Set the commit's category metadata to the first classifier that returns ``True``. |
| 75 | +commit_classifiers: |
| 76 | + - action: SummaryRegexMatch |
| 77 | + category: New |
| 78 | + kwargs: |
| 79 | + pattern: (?i)^(?:new|add)[^\n]*$ |
| 80 | + - action: SummaryRegexMatch |
| 81 | + category: Updates |
| 82 | + kwargs: |
| 83 | + pattern: (?i)^(?:update|change|rename|remove|delete|improve|refactor|chg|modif)[^\n]*$ |
| 84 | + - action: SummaryRegexMatch |
| 85 | + category: Fixes |
| 86 | + kwargs: |
| 87 | + pattern: (?i)^(?:fix)[^\n]*$ |
| 88 | + - action: |
| 89 | + category: Other |
| 90 | + |
| 91 | +# Tokens in git commit trailers that indicate authorship. |
| 92 | +valid_author_tokens: |
| 93 | + - author |
| 94 | + - based-on-a-patch-by |
| 95 | + - based-on-patch-by |
| 96 | + - co-authored-by |
| 97 | + - co-committed-by |
| 98 | + - contributions-by |
| 99 | + - from |
| 100 | + - helped-by |
| 101 | + - improved-by |
| 102 | + - original-patch-by |
| 103 | + |
| 104 | +# Rules applied to commits to determine the type of release to suggest. |
| 105 | +release_hint_rules: |
| 106 | + - match_result: dev |
| 107 | + no_match_result: no-release |
| 108 | + branch: ^((?!master|main).)*$ |
| 109 | + - match_result: patch |
| 110 | + no_match_result: no-release |
| 111 | + grouping: Other |
| 112 | + branch: master|main |
| 113 | + - match_result: patch |
| 114 | + no_match_result: no-release |
| 115 | + grouping: Fixes |
| 116 | + branch: master|main |
| 117 | + - match_result: minor |
| 118 | + no_match_result: no-release |
| 119 | + grouping: Updates |
| 120 | + branch: master|main |
| 121 | + - match_result: minor |
| 122 | + no_match_result: no-release |
| 123 | + grouping: New |
| 124 | + branch: master|main |
| 125 | + - match_result: major |
| 126 | + no_match_result: no-release |
| 127 | + grouping: Breaking Changes |
| 128 | + branch: master|main |
0 commit comments