Skip to content

Commit

Permalink
Update close-old-issue.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Asymtode712 authored May 27, 2024
1 parent a937f77 commit bb4b325
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/close-old-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
"https://api.github.com/repos/${{ github.repository }}/issues/$issue" \
| jq -r '.updated_at')
days_since_update=$(( ( $(date +%s) - $(date -d "$last_updated" +%s) ) / 86400 ))
if [ $days_since_update -gt 30 ]; then
if [ $days_since_update -gt 180 ]; then
curl -s -X PATCH -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"state":"closed"}' \
Expand All @@ -31,7 +31,7 @@ jobs:
# Add a comment explaining when the issue will be closed
curl -s -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"body":"This issue has been automatically closed because it has been inactive for more than 30 days. If you believe this is still relevant, feel free to reopen it or create a new one. Thank you!"}' \
-d '{"body":"This issue has been automatically closed because it has been inactive for more than 6 months. If you believe this is still relevant, feel free to reopen it or create a new one. Thank you!"}' \
"https://api.github.com/repos/${{ github.repository }}/issues/$issue/comments"
fi
done

0 comments on commit bb4b325

Please sign in to comment.