Skip to content

app/: the forge's events reach the domain: merged pull requests, closed and reopened branches (sc-8900) - #93

Merged
ndbroadbent merged 1 commit into
mainfrom
laravel-forge-listeners
Dec 2, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
laravel-forge-listeners

Conversation

@ndbroadbent

Copy link
Copy Markdown
Member

Part of sc-8900. The data side of the forge seam: subdomains' webhooks (#74) dispatch one event per linked project, and these listeners do the work.

Listeners:

  • PullRequestMerged → baselines::record_merge: the pull request's approvals become the base branch's at the merge commit.
  • BranchClosed → builds::close_branch, for a pull request closed without merging or a deleted branch. It's also what subdomains' hourly sync dispatches for branches that are gone.
  • BranchReopened → builds::reopen_branch.

Idempotent: a forge may deliver an event twice, so each listener is safe to run twice. tests/forge_events.rs dispatches every event twice.

RepositoryVisibilityChanged is subdomains' (the open-source check, #77), so it gets no listener here.

Merge after #74. app/src/forge/events.rs and its pub mod events; line are subdomains' file from #74, copied byte for byte, so rebasing onto #74 applies cleanly. If this lands first, #74's rebase sees the identical file.

…quest's approvals become the base branch's (record_merge), and closing or reopening a branch closes or brings back its builds waiting for review; each idempotent, with tests. forge/events.rs is subdomains' file from #74, byte for byte, so the rebase onto #74 applies cleanly
@ndbroadbent
ndbroadbent force-pushed the laravel-forge-listeners branch from 0799c9b to f100b5d Compare December 2, 2026 23:20
@ndbroadbent
ndbroadbent merged commit 5a6f7d8 into main Dec 2, 2026
11 checks passed
@ndbroadbent
ndbroadbent deleted the laravel-forge-listeners branch December 2, 2026 23:34
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.

1 participant