fix: stabilize scm observer dispatch#2531
Conversation
whoisasx
left a comment
There was a problem hiding this comment.
Thanks for making the lifecycle dispatch order deterministic. The sorting direction itself looks fine, but there is one regression in the same patch: tracked PR repo reconstruction now drops Owner/Name, while the GitHub provider still needs those fields for REST/GraphQL calls.
Once that tuple is normalized correctly again, this should be good to go.
| return ports.SCMRepo{}, false | ||
| } | ||
| return ports.SCMRepo{Provider: pr.Provider, Host: pr.Host, Owner: owner, Name: name, Repo: pr.Repo}, true | ||
| return ports.SCMRepo{Provider: pr.Provider, Host: pr.Host, Repo: pr.Repo}, true |
There was a problem hiding this comment.
This regresses tracked PR refreshes because the GitHub provider still builds REST/GraphQL requests from SCMRepo.Owner and SCMRepo.Name. Returning only Provider, Host, and Repo means a persisted PR such as upstream/api can later be refreshed with empty owner/name fields, so guard/fetch/review calls target an invalid repository and the observer stops updating that PR. Can we keep parsing pr.Repo into owner/name here, or centralize that normalization before provider calls?
Uh oh!
There was an error while loading. Please reload this page.