File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -26,11 +26,6 @@ if [[ -z $to_ref ]]; then
26
26
error " No to_ref specified"
27
27
fi
28
28
29
- ignore_missing_metadata=${CODER_IGNORE_MISSING_COMMIT_METADATA:- 0}
30
- if [[ $ignore_missing_metadata == 1 ]]; then
31
- log " WARNING: Ignoring missing commit metadata, breaking changes may be missed."
32
- fi
33
-
34
29
range=" $from_ref ..$to_ref "
35
30
36
31
# Check dependencies.
@@ -39,6 +34,10 @@ dependencies gh
39
34
COMMIT_METADATA_BREAKING=0
40
35
declare -A COMMIT_METADATA_TITLE COMMIT_METADATA_CATEGORY
41
36
37
+ # This environment variable can be set to 1 to ignore missing commit metadata,
38
+ # useful for dry-runs.
39
+ ignore_missing_metadata=${CODER_IGNORE_MISSING_COMMIT_METADATA:- 0}
40
+
42
41
main () {
43
42
# Match a commit prefix pattern, e.g. feat: or feat(site):.
44
43
prefix_pattern=" ^([a-z]+)(\([a-z]*\))?:"
@@ -144,6 +143,9 @@ export_commit_metadata() {
144
143
if [[ ${_COMMIT_METADATA_CACHE:- } == " ${range} :" * ]]; then
145
144
eval " ${_COMMIT_METADATA_CACHE#*: } "
146
145
else
146
+ if [[ $ignore_missing_metadata == 1 ]]; then
147
+ log " WARNING: Ignoring missing commit metadata, breaking changes may be missed."
148
+ fi
147
149
main
148
150
fi
149
151
You can’t perform that action at this time.
0 commit comments