Skip to content

Conversation

ralfhandl
Copy link
Contributor

@ralfhandl ralfhandl commented Oct 5, 2025

Fixes

The structure of the spec version development branches intentionally differs from the structure of the main branch. In addition to the files in main the development branches contain

  • the spec and schemas source files in the src folder
  • the schema tests files in the tests folder

All files except those in the src and tests folders should be identical between main and the development branches, and are regularly synced from main -> dev -> vX.Y-dev.

Merging a spec release into main with its full history makes subsequent the subsequent sync from main -> dev -> vX.Y-dev a bit more challenging than simply creating a PR merging the head branch into the base branch (which is what we did until now).

A sync that preserves the intentionally different structure of the base branch needs to perform these steps:

  • create sync branch from base branch
  • merge head branch into sync branch
  • restore src/* and tests/* files from base branch - these are the only intended structural differences
  • commit & push
  • create PR for merging sync branch into base branch

This PR updates the two sync workflows to automatically perform these steps.

The workflows have been tested in fork https://github.com/ralfhandl/OpenAPI-Specification, both with an "initial" sync of a spec release from main -> dev -> vX.Y-dev and with subsequent syncs of changes to files in main outside of the two special folders src and test:

Release syncs:

Non-release syncs:


  • no schema changes are needed for this pull request

Steps:
- create sync branch from base branch
- merge head branch into sync branch
- restore src/* and tests/* from base branch
- commit & push
- create PR for merging sync branch into base branch
@ralfhandl ralfhandl requested review from a team as code owners October 5, 2025 10:56
@ralfhandl ralfhandl linked an issue Oct 5, 2025 that may be closed by this pull request
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.

Fix branches problem, review branching strategy
1 participant