Skip to content

Add fork sync workflow - #1

Open
wickedyoda wants to merge 1 commit into
mainfrom
add/sync-fork-workflow
Open

wickedyoda wants to merge 1 commit into
mainfrom
add/sync-fork-workflow

Conversation

@wickedyoda

Copy link
Copy Markdown

Adds sync-fork.yml workflow to automatically sync this fork from its upstream parent repository daily at 04:00 UTC.

The workflow:

  • Auto-detects the upstream parent repo via GitHub API
  • Fetches and merges upstream changes into the fork's default branch
  • Preserves local .github/workflows/ files (protect_workflows: true by default)
  • Force-pushes the merged result (overwrites fork history with upstream)

Note: Any local changes outside .github/workflows/ will be overwritten during sync.

Copilot AI balanced review requested due to automatic review settings October 13, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Branch targeting, workflow protection, input handling, and shell injection issues must be resolved.

2 open findings
What changed in this PR

Adds a scheduled/manual workflow to synchronize the fork with its upstream repository.

Changes:

  • Detects the upstream repository and default branch.
  • Merges or force-syncs upstream changes.
  • Optionally preserves local workflows and writes a run summary.
File Description
.github/​workflows/​sync-fork.yml Implements upstream fork synchronization.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +55 to +61
env:
OPT_DRY_RUN: ${{ inputs.dry_run || 'false' }}
OPT_PROTECT_WORKFLOWS: ${{ inputs.protect_workflows || 'true' }}
OPT_FORCE_SYNC: ${{ inputs.force_sync || 'false' }}
run: |
PRE_SHA="${{ steps.pre_sync.outputs.sha }}"
BRANCH="${{ steps.upstream.outputs.branch }}"
id: sync
env:
OPT_DRY_RUN: ${{ inputs.dry_run || 'false' }}
OPT_PROTECT_WORKFLOWS: ${{ inputs.protect_workflows || 'true' }}
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.

2 participants