Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Purge a pull request's Actions caches when it closes

オープン 初心者向け
#649 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github-actions
領域
ci-cd

調査の方向性

まず、リポジトリの workflow ファイルと、issue で説明されている GitHub Actions cache API を調査します。workflow が pull_request のクローズを処理し、actions: write を持つ GITHUB_TOKEN を使用し、クローズされる pull request の merge ref に対するキャッシュのみを削除し、一致するキャッシュがない場合も成功し、branch-ref のキャッシュを変更しないことを確認します。

索引モデルが issue の本文から書いたものです。

説明

CD enhancement
Problem

Actions caches created for a pull request are never deleted when that pull request closes. They stay until GitHub evicts them after 7 days of no access. On 2026-08-19 this organisation held 5.95 GB of caches, and 4.3 GB of that was unused caches belonging to pull requests that were already merged or closed. Each repository on the Free plan gets 10 GB of cache. Filling it wastes the allowance and produces billing alert emails.

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_request with types: [closed].
  • It deletes every cache whose ref is refs/pull/<number>/merge for the pull request that just closed.
  • It uses the built-in GITHUB_TOKEN with permissions: 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/main and refs/heads/release/* are not touched.
Notes
  • One cache on this repository was 589 MB for a single pull request (#640). It was deleted by hand on 2026-08-19.
  • List caches with GET /repos/{owner}/{repo}/actions/caches, delete with DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}.
  • The same problem exists in Fallout.Extensions.VSCode, tracked in Fallout-build/Fallout.Extensions.VSCode#25.
主要言語
C#
スター
172
フォーク
21
平均マージ
4日 38分
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Fallout-build/Fallout のほかの issue

Fallout-build/Fallout の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。