Call documented REST endpoint for retired package deletion - #54
Merged
Merged
Conversation
The dispatched run 35492786770 verified the target (metadata
id=14842106, repository association makeitworkcloud/images, 13
versions) but failed before any HTTP DELETE because the pinned
github-script runtime exposes no
github.rest.packages.deletePackageForOrganization helper ("is not a
function"). No alias is guessed: replace only that call with
github.request('DELETE /orgs/{org}/packages/{package_type}/{package_name}',
{org, package_type, package_name}) using raw parameters. github.request
is the same stable pinned-runtime API already exercised in this script
through github.request.endpoint, and the step 0 pre-request check
already verified this exact route template encodes the parameters
exactly once. The official REST packages reference documents this
route and its 204 No Content success response.
Capture the response and require status 204 before logging the
deletion as accepted and starting the post-delete verification loop;
any other status fails. All identity checks, exact repository and
refs/heads/main guards, zero-input manual dispatch, permissions, pin,
timeout, concurrency, error handling, and bounded verification are
unchanged.
No dispatch, merge, or live API execution happens in this commit.
Image CI passedPre-commit validation passed. View the workflow run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace unavailable Octokit deletePackageForOrganization helper with documented whole-package REST DELETE and require204. Previous approved run verified exact package/repository metadata and13versions, then failed before any DELETE.
Fixes: N/A — completes approved temporary cleanup from #52/#53.
Type of change
Validation
Adversarial/security/delivery reviewers ADVANCE. Only DELETE invocation changes; fixed target, action pin, permissions, zero-input manual-main guards, metadata validation, once-encoding check and bounded post-delete404 verification unchanged.
Impact and rollout
Owner-approved merge/dispatch targets only opencode-sms-bridge. Require metadata success, DELETE204, then GET404. No other API permissions or package targets. Delete temporary workflow immediately after verified success. No source/image publication involved.
Safety and secrets
AI-assisted; no upstream communications.