File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,25 +22,27 @@ jobs:
2222 - name : Parse command
2323 id : parse
2424 run : |
25- COMMENT="${{ github.event.comment.body }}"
26- PR=${{ github.event.issue.number }}
25+ PR="$PR_NUMBER"
2726 echo "pr=$PR" >> "$GITHUB_OUTPUT"
2827
2928 # Detect changed frameworks from PR files via API (most reliable)
30- FRAMEWORKS=$(gh api "/repos/${{ github.repository }} /pulls/$PR/files" --jq '.[].filename' | grep '^frameworks/' | cut -d'/' -f2 | sort -u | head -1)
29+ FRAMEWORKS=$(gh api "/repos/$REPO /pulls/$PR/files" --jq '.[].filename' | grep '^frameworks/' | cut -d'/' -f2 | sort -u | head -1)
3130 echo "framework=$FRAMEWORKS" >> "$GITHUB_OUTPUT"
3231 echo "Detected framework: $FRAMEWORKS"
3332
34- if echo "$COMMENT " | grep -q '/benchmark'; then
33+ if echo "$COMMENT_BODY " | grep -q '/benchmark'; then
3534 echo "command=benchmark" >> "$GITHUB_OUTPUT"
3635 # Extract optional profile: /benchmark baseline
37- PROFILE=$(echo "$COMMENT " | grep -oP '/benchmark\s+\K\S+' || echo "")
36+ PROFILE=$(echo "$COMMENT_BODY " | grep -oP '/benchmark\s+\K\S+' || echo "")
3837 echo "profile=$PROFILE" >> "$GITHUB_OUTPUT"
39- elif echo "$COMMENT " | grep -q '/validate'; then
38+ elif echo "$COMMENT_BODY " | grep -q '/validate'; then
4039 echo "command=validate" >> "$GITHUB_OUTPUT"
4140 fi
4241 env :
4342 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
43+ COMMENT_BODY : ${{ github.event.comment.body }}
44+ PR_NUMBER : ${{ github.event.issue.number }}
45+ REPO : ${{ github.repository }}
4446
4547 - name : React to comment
4648 run : |
You can’t perform that action at this time.
0 commit comments