Skip to content

util: sync fork with upstream before Initializr PR creation#4372

Merged
jinseopkim0 merged 6 commits intomainfrom
release-initializr-sync
Mar 17, 2026
Merged

util: sync fork with upstream before Initializr PR creation#4372
jinseopkim0 merged 6 commits intomainfrom
release-initializr-sync

Conversation

@jinseopkim0
Copy link
Copy Markdown
Contributor

@jinseopkim0 jinseopkim0 commented Mar 11, 2026

This PR updates the automated Spring Initializr PR workflow to ensure that the user's fork is fully synchronized with the upstream repository before creating the release branch.

Previously, if a release manager had an old fork of spring-io/start.spring.io sitting on their GitHub account, the script could potentially branch off of a stale commit. By forcing a sync, the script guarantees that the automated PR is always based on the latest upstream main branch.

Adds new flags to `release.go` to provide more control over the release
lifecycle and allow resuming from failures:
- `-start-step`: Bypasses completed steps and starts from the specified ID.
- `-list-steps`: Prints a numbered list of all available steps for each branch.
- `-version`: Allows manually providing the release version (e.g., "8.0.1")
  to ensure verification steps work when the detection step is skipped.

Refactors the release workflow logic to support conditional step execution
and implements a version discovery fallback that attempts to extract the
release version from recently merged PRs if not explicitly provided.
Updates the automated PR creation for spring-io/start.spring.io to
automatically append a "Signed-off-by: Name <email>" line to the PR body.
This satisfies the Developer Certificate of Origin (DCO) requirement for
upstream Spring projects.

The script now dynamically fetches the user's full name using the GitHub
CLI and their email address from the local git config (falling back to
the -email flag if unavailable).
Updates the Spring Initializr PR workflow to ensure the user's fork is
fully synchronized with the upstream repository before creating the
release branch.

- Adds `gh repo sync` to update the remote fork on GitHub.
- Adds `git pull origin main` to ensure the local temporary clone is
  up to date with the freshly synced remote.
- Moves GitHub user information retrieval to the start of the function
   to support the synchronization step.
@jinseopkim0 jinseopkim0 requested a review from a team as a code owner March 11, 2026 18:36
@jinseopkim0 jinseopkim0 requested a review from lqiu96 March 11, 2026 18:51
Base automatically changed from release-initializr-dco to main March 17, 2026 20:22
@jinseopkim0 jinseopkim0 enabled auto-merge (squash) March 17, 2026 20:22
@jinseopkim0 jinseopkim0 merged commit 8a2fb16 into main Mar 17, 2026
54 of 56 checks passed
@jinseopkim0 jinseopkim0 deleted the release-initializr-sync branch March 17, 2026 20:41
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