Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/pr-request-report-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ jobs:

include_count="$(jq '[.[] | select(.name == "report: include")] | length' <<< "$labels_json")"
exclude_count="$(jq '[.[] | select(.name == "report: exclude")] | length' <<< "$labels_json")"
feature_flag_count="$(jq '[.[] | select(.name == "report: feature-flag")] | length' <<< "$labels_json")"
highlight_count="$(jq '[.[] | select(.name == "report: highlight")] | length' <<< "$labels_json")"

total_count=$((include_count + exclude_count + highlight_count))
total_count=$((include_count + exclude_count + feature_flag_count + highlight_count))

if [ "$total_count" -eq 0 ]; then
echo "valid=false" >> "$GITHUB_OUTPUT"
echo "message=Missing report label. Set exactly one of: \`report: include\`, \`report: exclude\` OR \`report: highlight\`." >> "$GITHUB_OUTPUT"
echo "message=Missing report label. Set exactly one of: \`report: include\`, \`report: highlight\`, \`report: feature-flag\` OR \`report: exclude\`." >> "$GITHUB_OUTPUT"
elif [ "$total_count" -gt 1 ]; then
echo "valid=false" >> "$GITHUB_OUTPUT"
echo "message=Only one report label is allowed: \`report: include\`, \`report: exclude\` OR \`report: highlight\`." >> "$GITHUB_OUTPUT"
echo "message=Only one report label is allowed: \`report: include\`, \`report: highlight\`, \`report: feature-flag\` OR \`report: exclude\`." >> "$GITHUB_OUTPUT"
else
echo "valid=true" >> "$GITHUB_OUTPUT"
fi
Expand Down
4 changes: 3 additions & 1 deletion scripts/merged-pr-report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# - PR PR number and link
# - merged Merge date (YYYY-MM-DD)
# - title PR title
# - report Status from labels (Highlight, Include, Exclude, Review)
# - report Status from labels (Highlight, Include, FeatureFlag, Exclude, Review)
# - beta First beta tag containing the merge commit (if any)
# - release First release tag containing the merge commit (if any)
#
Expand Down Expand Up @@ -127,6 +127,8 @@ map_report_status() {
echo "Include"
elif jq -e '.[] | select(.name == "report: exclude")' >/dev/null <<< "$labels_json"; then
echo "Exclude"
elif jq -e '.[] | select(.name == "report: feature-flag")' >/dev/null <<< "$labels_json"; then
echo "FeatureFlag"
else
echo "$DEFAULT_STATUS"
fi
Expand Down
Loading