Skip to content

fix: metadata not updating for github + webhook replacement on setup#1907

Merged
forestileao merged 1 commit intomainfrom
fix/github.onRelease-does-not-update-metadata-list
Jan 29, 2026
Merged

fix: metadata not updating for github + webhook replacement on setup#1907
forestileao merged 1 commit intomainfrom
fix/github.onRelease-does-not-update-metadata-list

Conversation

@forestileao
Copy link
Collaborator

@forestileao forestileao commented Jan 29, 2026

Summary

  • Update GitHub trigger metadata when the configured repository changes (not only on first setup).
  • Replace mismatched webhooks by detaching the node and soft-deleting the old webhook when it’s no longer shared.
  • Add a unit test to verify webhook replacement behavior.

Problem

  • Re-running GitHub onRelease setup did not update repository metadata when the repository changed.
  • Changing repository/configuration left old webhooks behind.

Solution

  • ensureRepoInMetadata now updates metadata when the repository differs.
  • RequestWebhook() verifies an existing webhook’s configuration, detaches the node on mismatch, and soft-deletes the webhook if it’s not shared.
  • Added unit coverage for the replacement behavior.

Closes: #1801

Signed-off-by: Pedro Foresti Leão <pedroforestileao@gmail.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 29, 2026

Deploying superplane with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2057da2
Status: ✅  Deploy successful!
Preview URL: https://a6f952cf.superplane.pages.dev
Branch Preview URL: https://fix-github-onrelease-does-no.superplane.pages.dev

View logs

@forestileao forestileao merged commit 0b6a73e into main Jan 29, 2026
5 checks passed
@forestileao forestileao deleted the fix/github.onRelease-does-not-update-metadata-list branch January 29, 2026 17:29
alabro-bm pushed a commit to alabro-bm/superplane that referenced this pull request Jan 30, 2026
…uperplanehq#1907)

## Summary
- Update GitHub trigger metadata when the configured repository changes
(not only on first setup).
- Replace mismatched webhooks by detaching the node and soft-deleting
the old webhook when it’s no longer shared.
- Add a unit test to verify webhook replacement behavior.

## Problem
- Re-running GitHub `onRelease` setup did not update repository metadata
when the repository changed.
- Changing repository/configuration left old webhooks behind.

## Solution
- `ensureRepoInMetadata` now updates metadata when the repository
differs.
- `RequestWebhook()` verifies an existing webhook’s configuration,
detaches the node on mismatch, and soft-deletes the webhook if it’s not
shared.
- Added unit coverage for the replacement behavior.

Closes: superplanehq#1801

Signed-off-by: Pedro Foresti Leão <pedroforestileao@gmail.com>
Signed-off-by: alabro-bm <atanas.labroski@brightmarbles.io>
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.

GitHub: OnRelease doesn't update meta

1 participant