Skip to content

Workflow to sync from upstream repo - #2

Open
narendraReddy45 wants to merge 2 commits into
purestorage:masterfrom
narendraReddy45:upstream_fork_sync
Open

Workflow to sync from upstream repo#2
narendraReddy45 wants to merge 2 commits into
purestorage:masterfrom
narendraReddy45:upstream_fork_sync

Conversation

@narendraReddy45

@narendraReddy45 narendraReddy45 commented Sep 2, 2026

Copy link
Copy Markdown

Description & Motivation

Keeping this fork in sync with upstream Cloud-Foundations/Dominator has been a manual process. Someone has to remember to check for new commits, pull them in, and resolve any conflicts. This PR automates that with a scheduled sync workflow, so upstream changes get surfaced and merged (or flagged) on a daily cadence instead of tracked by hand.

JIRA: https://jira.purestorage.com/browse/PEFM-364

Approach

This PR implements the below:

  • Runs a cron GitHub Action every day at 6 AM UTC (also triggerable manually via workflow_dispatch) to check upstream Cloud-Foundations/Dominator, diffing upstream's master against this fork's master. If a PR already exists, it's updated with a comment noting the latest changes. If not, a new PR is created. If no diff exists, the workflow exits without any modifications.
  • The diff check also compares actual trees, not just commit count, so commits already squash-merged or cherry-picked into the fork don't trigger a no-op PR.
  • If the merge would produce conflicts, the PR is opened or kept as a draft with a conflicts label and includes manual resolution steps, instead of being marked ready for review.
  • Manual runs support two options: dry_run (detect and report changes without pushing a branch or opening a PR) and force_sync (open a sync PR even if the fork appears up to date).
  • The whole workflow is gated behind an UPSTREAM_SYNC_ENABLED repo variable, so it's inert until explicitly turned on.
  • Sends Slack notifications for created/updated PRs, and a separate notification when a sync PR is merged into master.

Testing

Tested on personal fork , sample PR created with diff commits
narendraReddy45#3

@narendraReddy45
narendraReddy45 force-pushed the upstream_fork_sync branch 4 times, most recently from f9b0942 to bdeebeb Compare September 2, 2026 20:49
@narendraReddy45
narendraReddy45 marked this pull request as ready for review September 3, 2026 09:16
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.

1 participant