Watches the upstreams a repository mirrors and opens one update PR per upstream that moved.
Everything here is driven by upstreams.json and the handler commands it names, so any repository that vendors upstream code can use it: through the sync-upstreams bin, or the reusable sync-upstreams.yml workflow.
| Function |
Description |
| buildPrBody |
Writes the PR body. |
| compareWithUpstream |
Compares one entry with its upstream. |
| parseUpstreamsConfig |
Parses and validates an upstreams.json. |
| planSync |
Plans the PR a moved upstream asks for. |
| syncUpstreams |
Checks every entry, and opens or updates one PR per moved upstream. A handler or verify failure still opens the PR, as a draft with the failure in its body, so a breaking upstream change is seen rather than skipped. An error in the sync itself, such as a failed API call, is reported in the entry’s result and the next entry still runs. |
| writePin |
Records head as the entry’s pin in upstreams.json, unless the handler already moved it, keeping the file’s key order and formatting. |
| Type |
Description |
| UpstreamEntry |
One upstream that upstreams.json lists: a git one or an npm one. |