更新 .gitea/workflows/auto_join.yaml

This commit is contained in:
2025-03-01 13:35:18 +08:00
parent 9dd458a097
commit 2e08390f14
+4 -3
View File
@@ -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"}'