Purge a pull request's Actions caches when it closes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, github-actions
- Domain
- ci-cd
Research direction
Start with the repository's GitHub Actions workflow configuration and the documented cache endpoints: GET /repos/{owner}/{repo}/actions/caches and DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}. Verify the workflow handles the pull_request closed event, uses GITHUB_TOKEN with actions: write, removes only the matching refs/pull//merge caches, and succeeds when none exist.
Written by the indexing model from the issue text.
Description
Problem
Actions caches created for a pull request are never deleted when that pull request closes. On 2026-08-19 this repository held 15 caches of about 209 MB each, roughly 3.1 GB. Every one of them belonged to a pull request that was already merged or closed, and all 15 shared the same cache key. Each repository on the Free plan gets 10 GB of cache. Filling it wastes the allowance and produces billing alert emails for the organisation.
Outcome
When a pull request closes, the caches that belong only to that pull request are deleted automatically. No manual cleanup is needed.
Acceptance criteria
- A workflow runs on
pull_requestwithtypes: [closed]. - It deletes every cache whose
refisrefs/pull/<number>/mergefor the pull request that just closed. - It uses the built-in
GITHUB_TOKENwithpermissions: actions: write, not a personal access token. - The run succeeds when the pull request has no caches.
- Caches on branch refs such as
refs/heads/mainandrefs/heads/developare not touched.
Notes
- The 15 caches were deleted by hand on 2026-08-19.
- Because all 15 shared one cache key, each pull request stored a full copy of the same content. Worth checking whether the cache key needs to include the pull request ref at all.
- List caches with
GET /repos/{owner}/{repo}/actions/caches, delete withDELETE /repos/{owner}/{repo}/actions/caches/{cache_id}.
- Dominant language
- C#
- Stars
- 0
- Forks
- 0
- Avg merge
- 2h 43m
- Merged PRs (30d)
- 8
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Fallout-build/Fallout.Extensions.VSCode
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
blocked enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Fallout-build/Fallout.Extensions.VSCode#1 · 1 comment ·
All issues in Fallout-build/Fallout.Extensions.VSCode
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·