Repository navigation
feat(relay): announce a pull request merged outside lich - #937
Merged
Merged
Conversation
A merge made on github.com, with gh in a terminal or by an agent left every session in its checkout believing the pull request was still open. The relay now reads, each minute, the pull request of every checkout a live agent runs in, and announces one it saw open and now sees merged through AnnounceMerge, which remembers what it announced so the Pulls merge and the watch never tell it twice. The notice no longer says the merge came from lich.
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
ghin a terminal, an agent) is now announced to the agents in the branch's checkout, as one merged from Pulls is. The relay's newRunMergeWatchreads, each minute, the pull request of every checkout a live provider session runs in (project.BranchPullRequest, onegh pr viewper checkout) and callsAnnounceMergewhen one read saw it open and a later one sees it merged.AnnounceMergeremembers the merges it announced by checkout and number, so the Pulls merge and the watch never announce one twice, in either order.docs/ceilings.mdbullet rewritten: what the watch misses (merged while lich was closed or every agent there was parked, up to a minute late, forgotten on restart). Same audience on every provider, so no provider gap.Test plan
internal/relay/mergewatch_test.go: open then merged announces once; only checkouts with a live agent are read; first seen merged and closed are not announced; a failed read keeps what was seen; the Pulls merge and the watch announce once.internal/project:BranchPullRequestkeeps a merged PR, nil for none, passes a gh failure.gofmt,go vet ./...,go test ./..., relay merge tests with-race.