Skip to content

Numerical aggregate functions have an option to skip or include nans in calculation, skip by default #23700

Numerical aggregate functions have an option to skip or include nans in calculation, skip by default

Numerical aggregate functions have an option to skip or include nans in calculation, skip by default #23700

Workflow file for this run

name: PR Labels
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
pull_request:
# Trigger on these PR activities
types: [opened, reopened, synchronize, labeled, unlabeled]
jobs:
check_changelog_label:
name: Validate Changelog Label
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pull-requests: read # Grant permission to read PR information
steps:
- name: Get PR Labels from API
id: get_labels_api
uses: octokit/request-action@b91aabaa861c777dcdb14e2387e30eddf04619ae # v3.0.0 # Use an action to make API requests
with:
route: GET /repos/{owner}/{repo}/issues/{pull_number}/labels
owner: ${{ github.repository_owner }}
repo: ${{ github.event.repository.name }}
pull_number: ${{ github.event.pull_request.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Automatically provided token
- name: Extract and Check Labels
env:
API_RESPONSE: ${{ steps.get_labels_api.outputs.data }}
run: |
REQUIRED_LABELS=(
"changelog/break"
"changelog/deprecation"
"changelog/feature"
"changelog/performance"
"changelog/fix"
"changelog/docs"
"changelog/chore"
"changelog/ci"
"changelog/skip"
)
REQUIRED_LABELS_JSON=$(jq -n '$ARGS.positional' --args "${REQUIRED_LABELS[@]}")
echo "Required Labels: $REQUIRED_LABELS_JSON"
# Parse the response from the API call
# The API returns an array of label objects, we need just the 'name' property
echo "API Response: $API_RESPONSE"
# Extract only the label names into a JSON array
CURRENT_PR_LABELS_JSON=$(echo "$API_RESPONSE" | jq '[.[] | .name]')
echo "Current PR Labels from API: $CURRENT_PR_LABELS_JSON"
# Count how many changelog labels are present
found_labels=()
for label in "${REQUIRED_LABELS[@]}"; do
if echo "$CURRENT_PR_LABELS_JSON" | jq -e --arg label "$label" 'contains([$label])' > /dev/null; then
echo "Found changelog label: $label"
found_labels+=("$label")
fi
done
label_count=${#found_labels[@]}
echo "Total changelog labels found: $label_count"
if [ "$label_count" -eq 0 ]; then
echo "::error file=.github/workflows/pr-labels.yml::Pull Request is missing a required changelog label. Please add exactly one of: ${REQUIRED_LABELS[*]}."
exit 1
elif [ "$label_count" -gt 1 ]; then
echo "::error file=.github/workflows/pr-labels.yml::Pull Request has multiple changelog labels (${found_labels[*]}). Please keep only one."
exit 1
else
echo "Pull Request has exactly one changelog label: ${found_labels[0]}"
fi