Skip to content

Commit

Permalink
Update issues.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Deep-Dark-Forest authored Jan 28, 2025
1 parent b900e7f commit 6dc0f03
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,3 @@ jobs:
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }} \
-d '{"state": "closed", "state_reason": "completed"}'
fi
add-labels:
runs-on: ubuntu-latest
steps:
- name: Check if the issue was closed as completed and add label
uses: actions/github-script@v6
with:
github-token: ${{ secrets.SHEEP }}
script: |
if (context.payload.issue.state_reason === 'completed') {
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: ['👌 完成']
});
}
- name: Check if the issue was closed as duplicate and add label
uses: actions/github-script@v6
with:
github-token: ${{ secrets.SHEEP }}
script: |
if (context.payload.issue.state_reason === 'duplicate') {
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
labels: ['❌ 重复']
});
}

0 comments on commit 6dc0f03

Please sign in to comment.