Skip to content

Commit 0e82bde

Browse files
committed
chore(ci): add feature flag report flag and update script
1 parent 4d6a8fa commit 0e82bde

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/pr-request-report-labels.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ jobs:
3333
3434
include_count="$(jq '[.[] | select(.name == "report: include")] | length' <<< "$labels_json")"
3535
exclude_count="$(jq '[.[] | select(.name == "report: exclude")] | length' <<< "$labels_json")"
36+
feature_flag_count="$(jq '[.[] | select(.name == "report: feature-flag")] | length' <<< "$labels_json")"
3637
highlight_count="$(jq '[.[] | select(.name == "report: highlight")] | length' <<< "$labels_json")"
3738
38-
total_count=$((include_count + exclude_count + highlight_count))
39+
total_count=$((include_count + exclude_count + feature_flag_count + highlight_count))
3940
4041
if [ "$total_count" -eq 0 ]; then
4142
echo "valid=false" >> "$GITHUB_OUTPUT"
42-
echo "message=Missing report label. Set exactly one of: \`report: include\`, \`report: exclude\` OR \`report: highlight\`." >> "$GITHUB_OUTPUT"
43+
echo "message=Missing report label. Set exactly one of: \`report: include\`, \`report: highlight\`, \`report: feature-flag\` OR \`report: exclude\`." >> "$GITHUB_OUTPUT"
4344
elif [ "$total_count" -gt 1 ]; then
4445
echo "valid=false" >> "$GITHUB_OUTPUT"
45-
echo "message=Only one report label is allowed: \`report: include\`, \`report: exclude\` OR \`report: highlight\`." >> "$GITHUB_OUTPUT"
46+
echo "message=Only one report label is allowed: \`report: include\`, \`report: highlight\`, \`report: feature-flag\` OR \`report: exclude\`." >> "$GITHUB_OUTPUT"
4647
else
4748
echo "valid=true" >> "$GITHUB_OUTPUT"
4849
fi

scripts/merged-pr-report.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# - PR PR number and link
2929
# - merged Merge date (YYYY-MM-DD)
3030
# - title PR title
31-
# - report Status from labels (Highlight, Include, Exclude, Review)
31+
# - report Status from labels (Highlight, Include, FeatureFlag, Exclude, Review)
3232
# - beta First beta tag containing the merge commit (if any)
3333
# - release First release tag containing the merge commit (if any)
3434
#
@@ -127,6 +127,8 @@ map_report_status() {
127127
echo "Include"
128128
elif jq -e '.[] | select(.name == "report: exclude")' >/dev/null <<< "$labels_json"; then
129129
echo "Exclude"
130+
elif jq -e '.[] | select(.name == "report: feature-flag")' >/dev/null <<< "$labels_json"; then
131+
echo "FeatureFlag"
130132
else
131133
echo "$DEFAULT_STATUS"
132134
fi

0 commit comments

Comments
 (0)