-
Notifications
You must be signed in to change notification settings - Fork 69
ci: add workflow to clean up stale PRs and issues #792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: Clean Up Stale PRs and Issues | ||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * *" | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| stale: | ||
| name: Clean Up | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
|
Comment on lines
+11
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- .github/workflows/stale.yml ---'
cat -n .github/workflows/stale.yml
echo
echo '--- search for stale action usage/docs in repo ---'
rg -n "actions/stale|operation limit|actions: write|permissions:" .github/workflows . -g '!**/node_modules/**' || trueRepository: apollographql/apollo-mcp-server Length of output: 3146 🌐 Web query:
💡 Result: To resolve issues with the actions/stale v10+ action regarding cache state and operation limits, you must explicitly grant the Citations:
Add 🤖 Prompt for AI AgentsSource: MCP tools |
||
| steps: | ||
| - uses: actions/stale@v10 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
git ls-files .github/workflows/stale.yml
echo '---'
cat -n .github/workflows/stale.ymlRepository: apollographql/apollo-mcp-server Length of output: 1771 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
p = Path('.github/workflows/stale.yml')
print(p.exists())
if p.exists():
text = p.read_text()
for i, line in enumerate(text.splitlines(), 1):
if 'actions/stale' in line or 'uses:' in line:
print(f"{i}: {line}")
PYRepository: apollographql/apollo-mcp-server Length of output: 210 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Show the workflow and nearby context.
sed -n '1,80p' .github/workflows/stale.ymlRepository: apollographql/apollo-mcp-server Length of output: 1494 Pin 🤖 Prompt for AI AgentsSource: MCP tools |
||
| with: | ||
| days-before-stale: 60 | ||
| days-before-close: 14 | ||
| exempt-issue-labels: keep,security,pinned | ||
| exempt-pr-labels: keep,security,pinned | ||
| exempt-draft-pr: true | ||
| stale-issue-message: > | ||
| This issue has had no activity for 60 days and is now marked as stale. | ||
| It will be closed in 14 days if there is no further activity. Add the | ||
| `keep` label to keep it open. | ||
| close-issue-message: > | ||
| Closing this issue after 14 days of inactivity since it was marked stale. | ||
| Feel free to reopen if it is still relevant. | ||
| stale-pr-message: > | ||
| This pull request has had no activity for 60 days and is now marked as stale. | ||
| It will be closed in 14 days if there is no further activity. Add the | ||
| `keep` label to keep it open. | ||
| close-pr-message: > | ||
| Closing this pull request after 14 days of inactivity since it was marked stale. | ||
| Feel free to reopen if you plan to continue the work. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: apollographql/apollo-mcp-server
Length of output: 1739
🏁 Script executed:
Repository: apollographql/apollo-mcp-server
Length of output: 1739
🏁 Script executed:
rg -n "^concurrency:|cancel-in-progress:" .github/workflowsRepository: apollographql/apollo-mcp-server
Length of output: 648
Serialize scheduled and manual runs. Add a workflow-level
concurrencygroup withcancel-in-progress: falsesoscheduleandworkflow_dispatchruns queue instead of overlapping and racing duplicate stale comments or label/close mutations.Proposed fix
on: schedule: - cron: "0 0 * * *" workflow_dispatch: +concurrency: + group: stale-cleanup + cancel-in-progress: false📝 Committable suggestion
🤖 Prompt for AI Agents
Source: MCP tools