mirror of
https://github.com/kingmo888/rustdesk-api-server.git
synced 2025-09-15 15:28:42 +08:00
.
This commit is contained in:
parent
e465b8eb08
commit
f08d67ab78
10
.github/workflows/auto-close-issues.yml
vendored
10
.github/workflows/auto-close-issues.yml
vendored
@ -13,12 +13,14 @@ jobs:
|
||||
run: |
|
||||
ISSUE_USER=$(jq -r '.issue.user.login' < $GITHUB_EVENT_PATH)
|
||||
echo "Issue created by user: $ISSUE_USER"
|
||||
STARRED=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/user/starred/${{ github.repository }}" | \
|
||||
jq -r '.[].login' | grep -c "^$ISSUE_USER$" || true)
|
||||
echo "User starred: $STARRED"
|
||||
STARRED_RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/stargazers")
|
||||
echo "STARRED_RESPONSE=$STARRED_RESPONSE"
|
||||
|
||||
STARRED=$(echo "$STARRED_RESPONSE" | jq -r '.[] | select(.login == "'$ISSUE_USER'") | .login')
|
||||
echo "starred=$STARRED" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: Close issue if not starred
|
||||
if: env.starred == '0'
|
||||
run: |
|
||||
|
||||
Loading…
Reference in New Issue
Block a user