Skip to content

fix(wasm): add test-ext-api feature to mm2_main and mm2_bin_lib tomls #5497

fix(wasm): add test-ext-api feature to mm2_main and mm2_bin_lib tomls

fix(wasm): add test-ext-api feature to mm2_main and mm2_bin_lib tomls #5497

Workflow file for this run

name: PR Lint
on:
pull_request:
types:
- opened
- edited
- reopened
- synchronize
- labeled
- unlabeled
jobs:
main:
name: Validate PR
runs-on: ubuntu-latest
steps:
- uses: amannn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
feat
fix
improvement
chore
docs
deps
test
refactor
ci
requireScope: true
# Do not allow starting with uppercase for subject part
subjectPattern: ^(?![A-Z]).+$
headerPatternCorrespondence: type, scope, subject
- name: Check PR title length
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
title_length=${#TITLE}
if [ $title_length -gt 85 ]
then
echo "PR title is too long (greater than 85 characters)"
exit 1
fi
- name: Check PR labels
env:
LABEL_NAMES: ${{ toJson(github.event.pull_request.labels.*.name) }}
run: |
# Define the allowed status labels
ALLOWED_LABELS=("status: pending review" "status: in progress")
# Convert LABEL_NAMES (which is JSON) into a bash-readable array
LABEL_ARRAY=($(echo "${LABEL_NAMES}" | jq -r '.[]'))
count=0
for allowed_label in "${ALLOWED_LABELS[@]}"; do
for pr_label in "${LABEL_ARRAY[@]}"; do
if [ "$pr_label" = "$allowed_label" ]; then
count=$((count+1))
fi
done
done
# We want exactly one match
if [ $count -ne 1 ]; then
echo "PR must have exactly one of these labels: ${ALLOWED_LABELS[*]}."
echo "Found labels: ${LABEL_ARRAY[*]}"
exit 1
else
echo "PR has the valid status label."
fi