1616 types : [published]
1717 workflow_dispatch : {}
1818
19- permissions :
20- contents : write
21- pull-requests : write
19+ permissions : {}
2220
2321jobs :
2422 check :
2523 name : Check for stale skills
2624 runs-on : ubuntu-latest
25+ permissions :
26+ contents : write
27+ pull-requests : write
2728 steps :
2829 - name : Checkout
29- uses : actions/checkout@v4
30+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3031 with :
3132 fetch-depth : 0
33+ persist-credentials : true # review job pushes a generated branch
3234
3335 - name : Setup Node
34- uses : actions/setup-node@v4
36+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3537 with :
3638 node-version : 20
3739
@@ -108,8 +110,11 @@ jobs:
108110 if : steps.stale.outputs.has_stale == 'true'
109111 env :
110112 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
113+ PROMPT : ${{ steps.summary.outputs.prompt }}
114+ RELEASE_VERSION : ${{ github.event.release.tag_name || 'manual' }}
115+ SUMMARY : ${{ steps.summary.outputs.summary }}
111116 run : |
112- VERSION="${{ github.event.release.tag_name || 'manual' }} "
117+ VERSION="$RELEASE_VERSION "
113118 BRANCH="skills/review-${VERSION}"
114119
115120 git config user.name "github-actions[bot]"
@@ -118,26 +123,20 @@ jobs:
118123 git commit --allow-empty -m "chore: review stale skills for ${VERSION}"
119124 git push origin "$BRANCH"
120125
126+ {
127+ printf '%s\n\n' '## Stale Skills Detected'
128+ printf '%s\n\n' 'The following skills may need updates after the latest release:'
129+ printf '%s\n\n' "$SUMMARY"
130+ printf '%s\n\n' '---'
131+ printf '%s\n\n' '### Update Prompt'
132+ printf '%s\n\n' 'Paste this into your coding agent (Claude Code, Cursor, etc.):'
133+ printf '%s\n' '~~~'
134+ printf '%s\n' "$PROMPT"
135+ printf '%s\n' '~~~'
136+ } > pr-body.md
137+
121138 gh pr create \
122139 --title "Review stale skills (${VERSION})" \
123- --body "$(cat <<'PREOF'
124- ## Stale Skills Detected
125-
126- The following skills may need updates after the latest release:
127-
128- ${{ steps.summary.outputs.summary }}
129-
130- ---
131-
132- ### Update Prompt
133-
134- Paste this into your coding agent (Claude Code, Cursor, etc.):
135-
136- ~~~
137- ${{ steps.summary.outputs.prompt }}
138- ~~~
139-
140- PREOF
141- )" \
140+ --body-file pr-body.md \
142141 --head "$BRANCH" \
143142 --base main
0 commit comments