mirror of
https://github.com/anthropics/claude-code.git
synced 2025-10-19 03:17:50 +03:00
- Add stale-issue-manager.yml to check and manage inactive issues daily - Add remove-autoclose-label.yml to remove autoclose label when users comment - Issues get warning after 30 days of inactivity - Issues auto-close after 60 days (30 days after warning) - User comments reset the stale timer by removing autoclose label 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
42 lines
1.4 KiB
YAML
42 lines
1.4 KiB
YAML
name: "Remove Autoclose Label on Activity"
|
|
|
|
on:
|
|
issue_comment:
|
|
types: [created]
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
jobs:
|
|
remove-autoclose:
|
|
# Only run if the issue has the autoclose label
|
|
if: |
|
|
github.event.issue.state == 'open' &&
|
|
contains(github.event.issue.labels.*.name, 'autoclose') &&
|
|
github.event.comment.user.login != 'github-actions[bot]'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Remove autoclose label
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
console.log(`Removing autoclose label from issue #${context.issue.number} due to new comment from ${context.payload.comment.user.login}`);
|
|
|
|
try {
|
|
// Remove the autoclose label
|
|
await github.rest.issues.removeLabel({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
issue_number: context.issue.number,
|
|
name: 'autoclose'
|
|
});
|
|
|
|
console.log(`Successfully removed autoclose label from issue #${context.issue.number}`);
|
|
} catch (error) {
|
|
// If the label was already removed or doesn't exist, that's fine
|
|
if (error.status === 404) {
|
|
console.log(`Autoclose label was already removed from issue #${context.issue.number}`);
|
|
} else {
|
|
throw error;
|
|
}
|
|
} |