File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 3131 - name : Check out code
3232 uses : actions/checkout@v5
3333
34+ - name : Generate token from GitHub App
35+ id : generate_token
36+ uses : actions/create-github-app-token@v1
37+ with :
38+ app-id : ${{ secrets.APP_ID }}
39+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
40+
3441 - name : Fetch and process stale discussions
3542 env :
36- GH_TOKEN : ${{ secrets.DISCUSSION_TOKEN }}
43+ GH_TOKEN : ${{ steps.generate_token.outputs.token }}
3744 STALE_DAYS : ${{ env.STALE_DAYS }}
3845 WARNING_DAYS : ${{ env.WARNING_DAYS }}
3946 WARNING_MESSAGE : ${{ env.WARNING_MESSAGE }}
4249 GITHUB_REPOSITORY_NAME : ${{ github.event.repository.name }}
4350 run : |
4451 if [ -z "$GH_TOKEN" ]; then
45- echo "ERROR: GH_TOKEN is not set. Make sure the DISCUSSION_TOKEN secret is configured."
52+ echo "ERROR: GH_TOKEN is not set. Make sure the GitHub App is configured correctly ."
4653 exit 1
4754 fi
4855 echo "GH_TOKEN is set (length: ${#GH_TOKEN})"
You can’t perform that action at this time.
0 commit comments