divinci-ai/Sync Fork Action
Keep a fork branch in sync with an upstream repository. Composite, auditable, no vendored code.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| upstream_repository | The upstream repository to sync FROM. Either "owner/repo" (resolved to https://github.com/owner/repo.git) or a full https URL. | yes | — |
| upstream_branch | The branch on the upstream repository to sync from (e.g. main). | yes | — |
| target_branch | The branch on THIS fork to sync into and push (e.g. main). | yes | — |
| github_token | Token used to push to this fork (and to read the upstream when it is on github.com and no upstream_token is given). Defaults to the workflow token. | no | ${{ github.token }} |
| upstream_token | Optional token used ONLY to fetch from the upstream repository. Set this when the upstream is private and github_token cannot read it. Leave empty for public upstreams. | no | "" |
| sync_mode | How to integrate upstream commits into the target branch: "merge" (default, creates a merge commit when needed), "rebase" (replay target commits on top of upstream), "reset" (hard-reset target to exactly match upstream; force-pushes). | no | merge |
| fetch_args | Extra args appended to `git fetch upstream` (e.g. --tags). TRUSTED INPUT: these are passed to git unquoted and must never come from untrusted data. | no | "" |
| merge_args | Extra args appended to the integration command (git merge/rebase) for "merge"/"rebase" modes (e.g. --ff-only). TRUSTED INPUT. | no | "" |
| push_args | Extra args appended to `git push`. For "reset" mode a force flag is added automatically unless you supply your own here. TRUSTED INPUT. | no | "" |
| git_user_name | Name used for the local sync commit author/committer. | no | github-actions[bot] |
| git_user_email | Email used for the local sync commit author/committer. | no | 41898282+github-actions[bot]@users.noreply.github.com |
| dry_run | When "true", report what would be synced but do not integrate or push. | no | false |
Outputs
| name | description |
|---|---|
| has_new_commits | "true" when the upstream had commits the target branch was missing. |
| commit_count | Number of upstream commits the target branch was behind. |
| upstream_sha | The resolved commit SHA of the upstream branch tip. |