Skip to content

mutationInvalidates params with literal value @me #9

mutationInvalidates params with literal value @me

mutationInvalidates params with literal value @me #9

name: Issue Labeler
on:
issues:
types:
- reopened
- opened
env:
OUTPUT_CLIENTS: >-
axios fetch hono angular angular-query react-query vue-query svelte-query
solid-query solid-start swr zod mcp
jobs:
label-issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add label from issue form
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }}
ISSUE_BODY: ${{ github.event.issue.body }}
run: |
client="$(printf '%s\n' "$ISSUE_BODY" | awk 'BEGIN{IGNORECASE=1} /^### Output client[[:space:]]*$/{while (getline) {gsub(/\r/, ""); line=$0; gsub(/^[[:space:]]+|[[:space:]]+$/, "", line); if (line != "") {print tolower(line); exit}}}')"
if [ -z "$client" ]; then
echo "No output client label; skipping."
exit 0
fi
case " $OUTPUT_CLIENTS " in
*" $client "*)
label="$client"
# labels and output clients don't map 1:1, so we map to existing repo labels
if [ "$client" = "react-query" ]; then
label="tanstack-query"
elif [ "$client" = "angular-query" ]; then
label="angular"
elif [ "$client" = "solid-query" ] || [ "$client" = "solid-start" ]; then
label="solid"
elif [ "$client" = "svelte-query" ]; then
label="svelte"
fi
gh issue edit "$NUMBER" --add-label "$label"
;;
*)
echo "Unsupported client label; skipping."
exit 0
;;
esac