Skip to content

Fix Actions Storage Cleanup: paginate calls fail with empty owner/repo#107

Merged
harpua555 merged 2 commits intomainfrom
copilot/fix-cleanup-workflow-action
Mar 1, 2026
Merged

Fix Actions Storage Cleanup: paginate calls fail with empty owner/repo#107
harpua555 merged 2 commits intomainfrom
copilot/fix-cleanup-workflow-action

Conversation

Copy link
Contributor

Copilot AI commented Mar 1, 2026

github.paginate(github.request, 'GET /repos/{owner}/{repo}/...', { owner, repo }) does not resolve URL template variables — the actual request URL becomes https://api.github.com/repos///actions/workflows, resulting in a 404.

Changes

  • Replace all three github.paginate(github.request, ...) calls with the correct github.rest.* endpoint methods, which properly interpolate owner/repo and handle pagination:
// Before (broken)
github.paginate(github.request, 'GET /repos/{owner}/{repo}/actions/workflows', { owner, repo, per_page: 100 })

// After
github.paginate(github.rest.actions.listRepoWorkflows, { owner, repo, per_page: 100 })

Affected calls:

  • listRepoWorkflows
  • listWorkflowRuns
  • getActionsCacheList

The github.request(...) DELETE calls are unaffected — template interpolation works correctly there.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…calls

Co-authored-by: harpua555 <93162369+harpua555@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix cleanup workflow action not working Fix Actions Storage Cleanup: paginate calls fail with empty owner/repo Mar 1, 2026
@harpua555 harpua555 marked this pull request as ready for review March 1, 2026 16:12
@harpua555 harpua555 self-requested a review as a code owner March 1, 2026 16:12
@harpua555 harpua555 merged commit 945d310 into main Mar 1, 2026
@harpua555 harpua555 deleted the copilot/fix-cleanup-workflow-action branch March 1, 2026 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants