Add GET /my_packages/:name/webhook status endpoint - #618
Open
AMDphreak wants to merge 1 commit into
Open
Conversation
Package admins can query GET /my_packages/:name/webhook for JSON {configured:bool}. Tooling previously had to scrape HTML or call regen_secret, which rotates the secret and breaks forge webhooks.
Co-authored-by: Cursor <cursoragent@cursor.com>
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
GET /my_packages/:packname/webhookreturning JSON{package,configured}without regenerating the secrethasPackageSecreton the DB/registry layersapi-docs/http-update.mdFixes #617
Motivation
Owner tooling (e.g. dub-publish) needs to check whether webhooks are enabled. The only existing owner HTTP actions are
regen_secret(destructive rotate) andunset_secret. Scraping the My packages HTML works but is fragile; callingregen_secretto check status invalidates forge webhook URLs.Plaintext secrets remain one-shot after regenerate — this endpoint only exposes a boolean.
Test plan
GET /my_packages/:name/webhookwith session cookie returnsconfigured:falsebefore enableregen_secret, same GET returnsconfigured:true