Skip to content

Commit 153d8b5

Browse files
committed
chore: use more verbose change_type
1 parent 1d400de commit 153d8b5

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

.chloggen/TEMPLATE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Use this changelog template to create an entry for release notes.
22

3-
# One of 'feat', 'fix', 'docs'. Inferred from conventional commit tag if PR created before `make chlog-new`.
3+
# One of 'feature', 'bug_fix', 'docs'. Inferred from conventional commit tag if PR created before `make chlog-new`.
44
change_type:
55

66
# Mandatory. One of: distributions, distributions/nrdot-collector, distributions/nrdot-collector-experimental, examples

.chloggen/kbauer_update_use_case_docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Use this changelog template to create an entry for release notes.
22

3-
# One of 'feat', 'fix', 'docs'. Inferred from conventional commit tag if PR created before `make chlog-new`.
3+
# One of 'feature', 'bug_fix', 'docs'. Inferred from conventional commit tag if PR created before `make chlog-new`.
44
change_type: docs
55
# Mandatory. One of: distributions, distributions/nrdot-collector, distributions/nrdot-collector-experimental, examples
66
component: distributions

scripts/chloggen-wrapper.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ if [ "$COMMAND" = new ]; then
5757
# Infer change_type from the conventional commit prefix of the PR title
5858
PR_TITLE=$(gh pr view "$BRANCH_NAME" --json title --jq '.title' 2>/dev/null)
5959
case "$PR_TITLE" in
60-
feat*) yq -i '.change_type = "feat"' "$filepath";;
61-
perf*) yq -i '.change_type = "feat"' "$filepath";;
62-
fix*) yq -i '.change_type = "fix"' "$filepath";;
60+
feat*) yq -i '.change_type = "feature"' "$filepath";;
61+
perf*) yq -i '.change_type = "feature"' "$filepath";;
62+
fix*) yq -i '.change_type = "bug_fix"' "$filepath";;
6363
docs*) yq -i '.change_type = "docs"' "$filepath";;
6464
*) echo "ℹ️ change_type not inferred; PR title '$PR_TITLE' prefix does not map to a change_type (feat, fix, docs)." >&2;;
6565
esac
@@ -72,13 +72,13 @@ if [ "$COMMAND" = new ]; then
7272
fi
7373

7474
# Semi-arbitrarily map our in-house change types to change types allowed by chloggen.
75-
# When the changelog is updated, these will be translated back into feature, fix, and docs via summary.tmpl
75+
# When the changelog is updated, these will be placed under the proper headers via summary.tmpl
7676
translate_change_type() {
7777
case "$1" in
78-
feat) echo enhancement;;
79-
fix) echo bug_fix;;
78+
feature) echo enhancement;;
79+
bug_fix) echo bug_fix;;
8080
docs) echo new_component;;
81-
*) echo "Error: invalid change_type '$1'. Specify one of [feat fix docs]" >&2; return 1;;
81+
*) echo "Error: invalid change_type '$1'. Specify one of [feature bug_fix docs]" >&2; return 1;;
8282
esac
8383
}
8484

0 commit comments

Comments
 (0)