Public: anyone can read this; the crew can change it.

A test pins that a webhook belongs to its repository: `getWebhook` and `deleteWebhook` never reach another repository's hook #6789

shipped production is serving it opened this has it
opened this

src/core/webhooks.ts takes a repository id beside the webhook id; nothing tests that the pair is enforced.

Done when a new test file proves, with two repositories each holding a hook:

  • [ ] getWebhook(repoA, hookOfB) is undefined and deleteWebhook(repoA, hookOfB) deletes nothing (B's hook still listed).
  • [ ] deleteWebhook(repoA, hookOfA) removes it, and a second delete reports nothing removed.
  • [ ] listWebhooks lists only the repository's own; recentDeliveries only that hook's.

Test only; a bug it finds is fixed in the same pull.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs