diff --git a/.gitea/workflows/auto_join.yaml b/.gitea/workflows/auto_join.yaml index 17357fe..a0aee01 100644 --- a/.gitea/workflows/auto_join.yaml +++ b/.gitea/workflows/auto_join.yaml @@ -9,6 +9,7 @@ jobs: env: ISSUE_AUTHOR: "${{ github.event.issue.user.login }}" ISSUE_BODY: "${{ github.event.issue.body }}" + API_URL: ${{ github.api_url }} steps: - name: Output GitHub Context id: output-context @@ -41,7 +42,7 @@ jobs: curl -X PUT \ -H "Authorization: token $TOKEN" \ -H "Content-Type: application/json" \ - "{$api_url}/teams/$TEAM_ID/members/$ISSUE_AUTHOR" + "$API_URL/teams/$TEAM_ID/members/$ISSUE_AUTHOR" echo "请求成功 ( $ISSUE_AUTHOR" @@ -58,7 +59,7 @@ jobs: curl -s -X POST \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/json" \ - {$api_url}/repos/${{ github.repository }}/issues/$ISSUE_NUMBER/comments \ + $API_URL/repos/${{ github.repository }}/issues/$ISSUE_NUMBER/comments \ -d "{\"body\": \"$COMMENT_BODY\"}" - name: Close issue @@ -69,5 +70,5 @@ jobs: curl -s -X PATCH \ -H "Authorization: token $GITHUB_TOKEN" \ -H "Accept: application/json" \ - {$api_url}/repos/${{ github.repository }}/issues/$ISSUE_NUMBER \ + $API_URL/repos/${{ github.repository }}/issues/$ISSUE_NUMBER \ -d '{"state": "closed"}'