Skip to content

Commit fac7c02

Browse files
mafredribpmct
andauthored
ci: Add support for release/experimental label (#6208)
Co-authored-by: Ben Potter <ben@coder.com>
1 parent 5e4931e commit fac7c02

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

docs/CONTRIBUTING.md

+4
Original file line numberDiff line numberDiff line change
@@ -236,3 +236,7 @@ Breaking changes can be triggered in two ways:
236236
### Security
237237

238238
The [`security`](https://github.com/coder/coder/issues?q=sort%3Aupdated-desc+label%3Asecurity) label can be added to PRs that have, or will be, merged into `main`. Doing so will make sure the change stands out in the release notes.
239+
240+
### Experimental
241+
242+
The [`release/experimental`](https://github.com/coder/coder/issues?q=sort%3Aupdated-desc+label%3Arelease%2Fexperimental) label can be used to move the note to the bottom of the release notes under a separate title.

scripts/release.sh

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ either contain a known prefix with an exclamation mark ("feat!:",
2525
GitHub labels that affect release notes:
2626
2727
- release/breaking: Shown under BREAKING CHANGES, prevents patch release.
28+
- release/experimental: Shown at the bottom under Experimental.
2829
- security: Shown under SECURITY.
2930
3031
Flags:

scripts/release/check_commit_metadata.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ main() {
4848
breaking_title="^[a-z]+(\([a-z]*\))?!:"
4949
breaking_label=release/breaking
5050
breaking_category=breaking
51+
experimental_label=release/experimental
52+
experimental_category=experimental
5153

5254
# Security related changes are labeled `security`.
5355
security_label=security
56+
security_category=security
5457

5558
# Get abbreviated and full commit hashes and titles for each commit.
5659
git_log_out="$(git log --no-merges --pretty=format:"%h %H %s" "$range")"
@@ -120,7 +123,10 @@ main() {
120123
COMMIT_METADATA_BREAKING=1
121124
continue
122125
elif [[ ${labels[$commit_sha_long]:-} = *"label:$security_label"* ]]; then
123-
COMMIT_METADATA_CATEGORY[$commit_sha_short]=$security_label
126+
COMMIT_METADATA_CATEGORY[$commit_sha_short]=$security_category
127+
continue
128+
elif [[ ${labels[$commit_sha_long]:-} = *"label:$experimental_label"* ]]; then
129+
COMMIT_METADATA_CATEGORY[$commit_sha_short]=$experimental_category
124130
continue
125131
fi
126132

scripts/release/generate_release_notes.sh

+5
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ declare -a section_order=(
8181
chore
8282
revert
8383
other
84+
experimental
8485
)
8586

8687
declare -A section_titles=(
@@ -97,6 +98,7 @@ declare -A section_titles=(
9798
[chore]='Chores'
9899
[revert]='Reverts'
99100
[other]='Other changes'
101+
[experimental]='Experimental changes'
100102
)
101103

102104
# Verify that all items in section_order exist as keys in section_titles and
@@ -134,6 +136,9 @@ changelog="$(
134136
changes="$(eval "echo -e \"\${${cat}_changelog:-}\"")"
135137
if ((${#changes} > 0)); then
136138
echo -e "\n### ${section_titles["$cat"]}\n"
139+
if [[ $cat == experimental ]]; then
140+
echo -e "These changes are feature-flagged and can be enabled with the \`--experiments\` server flag. They may change or be removed in future releases.\n"
141+
fi
137142
echo -e "$changes"
138143
fi
139144
done

0 commit comments

Comments
 (0)