Skip to content

dev: update from main #4392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Mar 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
20a3024
Run respec without sandbox
ralfhandl Feb 13, 2025
d368f35
Describe publishing process
ralfhandl Feb 14, 2025
72cb498
Bump vitest from 3.0.5 to 3.0.6
dependabot[bot] Feb 20, 2025
57962a3
Merge pull request #4371 from OAI/dependabot/npm_and_yarn/vitest-3.0.6
ralfhandl Feb 20, 2025
4f0379b
Merge pull request #4358 from OAI/ralfhandl-respec-no-sandbox
lornajane Feb 20, 2025
d27078e
Update CONTRIBUTING.md
lornajane Feb 20, 2025
f9a2302
Merge pull request #4363 from ralfhandl/main-contributing-schema-publish
lornajane Feb 20, 2025
e26c74c
Update style-guide.md
ralfhandl Feb 20, 2025
c7e9bd8
Merge pull request #4377 from OAI/ralfhandl-style-guide-yaml-comments
lornajane Feb 23, 2025
bb8aac5
Bump vitest from 3.0.6 to 3.0.7
dependabot[bot] Feb 25, 2025
ce098b8
Merge pull request #4381 from OAI/dependabot/npm_and_yarn/vitest-3.0.7
ralfhandl Feb 25, 2025
bb50d43
style guide: no requirements in "Examples" sections
ralfhandl Feb 25, 2025
5bc34d8
Update agenda.md
duncanbeevers Feb 27, 2025
b5ab378
Merge pull request #4385 from duncanbeevers/patch-1
lornajane Feb 27, 2025
4ffcb64
Update style-guide.md
ralfhandl Feb 28, 2025
1dd2c02
Create sync-main-to-dev.yaml
ralfhandl Feb 28, 2025
70a5c94
Other versions links in frontmatter
ralfhandl Mar 1, 2025
3e40ee4
Merge pull request #4382 from OAI/ralfhandl-style-guide-no-requirements
lornajane Mar 2, 2025
428007d
Merge pull request #4401 from ralfhandl/main-respec-other-versions
ralfhandl Mar 3, 2025
fa1f64a
Create check-restricted-files.yaml
ralfhandl Mar 2, 2025
a963ad6
Simplified approach
ralfhandl Mar 4, 2025
249dcef
Merge pull request #4407 from ralfhandl/main-protect-files-simpler
lornajane Mar 5, 2025
b58c0a9
Add notes on the new workflow
lornajane Mar 5, 2025
bc7aaf3
Merge pull request #4393 from OAI/main-workflow-sync-main-to-devf
lornajane Mar 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/templates/agenda.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Meetings take place over Zoom: [https://zoom.us/j/975841675](https://zoom.us/j/9

| Blur My Background | Raise Hand |
|-|-|
| <img width="323" alt="Screenshot of Zoom UI showing the 'Stop Video' and 'Blur My Background' control" src="https://github.com/OAI/OpenAPI-Specification/assets/7367/7e43dbbb-6529-46e6-8b04-4c1aa852d9dd"> | <img width="323" alt="Screenshot of Zoom UI showing the 'Reaction' and 'Raise Hand' control" src="https://github.com/OAI/OpenAPI-Specification/assets/7367/f991722f-4651-40aa-9bc4-7e9a2a165a6a"> |
| <img width="323" alt="Screenshot of Zoom UI showing the 'Stop Video' and 'Blur My Background' control" src="https://github.com/OAI/OpenAPI-Specification/assets/7367/7e43dbbb-6529-46e6-8b04-4c1aa852d9dd"> | <img width="323" alt="Screenshot of Zoom UI showing the 'Reaction' and 'Raise Hand' control" src="https://github.com/user-attachments/assets/bf19ee70-59b1-410e-b893-645f26c2c96e"> |

### Agenda Structure

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/check-restricted-files.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: check-restricted-files

# Author: @ralfhandl
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/3432

# This workflow fails if restricted files are changed in a pull request

on:
pull_request:
paths:
- 'schemas/**/*.yaml'
- 'versions/*.md'

jobs:
check-files:
runs-on: ubuntu-latest
steps:
- name: Check changed files
shell: bash
run: |
echo This PR contains changes to files that should not be changed
exit 1
40 changes: 40 additions & 0 deletions .github/workflows/sync-main-to-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: sync-main-to-dev

# author: @ralfhandl

#
# This workflow creates PRs to update the dev branch with the latest changes from main
#

# run this on push to main
on:
push:
branches:
- main

jobs:
sync-branch:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Create pull request
id: pull_request
shell: bash
run: |
EXISTS=$(gh pr list --base $BASE --head $HEAD \
--json number --jq '.[] | .number')
if [ ! -z "$EXISTS" ]; then
echo "PR #$EXISTS already wants to merge $HEAD into $BASE"
exit 0
fi

gh pr create --base $BASE --head $HEAD \
--label "Housekeeping" \
--title "$BASE: update from $HEAD" \
--body "Merge \`$HEAD\` into \`$BASE\`."
env:
GH_TOKEN: ${{ github.token }}
HEAD: main
BASE: dev
26 changes: 21 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,19 @@ Reviews requesting changes should have their changes addressed regardless of how

## Publishing

The specification are published to the [spec site](https://spec.openapis.org) by creating an `vX.Y.Z-rel` branch where `src/oas.md` is renamed to the appropriate `versions/X.Y.Z.md` file and then merged to `main`.
The HTML versions of the OAS are automatically generated from the `versions` directory on `main`.
### Specification Versions

The specification versions are published to the [spec site](https://spec.openapis.org) by creating an `vX.Y.Z-rel` branch where `src/oas.md` is renamed to the appropriate `versions/X.Y.Z.md` file and then merged to `main`.
This renaming on the `vX.Y.Z-rel` branch preserves the commit history for the published file on `main` when using `git log --follow` (as is the case for all older published files).

The schemas are published [in the schema section on the spec site](https://spec.openapis.org/#openapi-specification-schemas).
As part of the publishing process, the `WORK-IN-PROGRESS` placeholders are replaced with dates as appropriate.
Schemas are published/updated independently from the specification releases.
The HTML renderings of the specification versions are automatically generated from the `versions` directory on `main` by the [`respec` workflow](https://github.com/OAI/OpenAPI-Specification/blob/main/.github/workflows/respec.yaml), which generates a pull request for publishing the HTML renderings to the [spec site](https://spec.openapis.org).

### Schema Iterations

The schema iterations are published independently from the specification releases [in the schema section on the spec site](https://spec.openapis.org/#openapi-specification-schemas).
Schemas are updated in and directly published from the `vX.Y-dev` branches.

As part of the publishing process, the YAML source files are converted to JSON, renamed to the relevant last-changed dates, and `WORK-IN-PROGRESS` placeholders are replaced with these dates as appropriate. This is usually done by the `schema-publish` workflow which detects changes on each `vX.Y-dev` branch, which generates a pull request for publishing the new schema iterations to the [spec site](https://spec.openapis.org). The workflow can also be run manually if required.

## Release Process and Scope

Expand Down Expand Up @@ -299,6 +305,7 @@ For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and e

* `main` is used to publish finished work and hold the authoritative versions of general documentation such as this document, which can be merged out to other branches as needed. The `src` tree is ***not*** present on `main`.
* `dev` is the primary branch for working with the `src` tree, which is kept up-to-date with the most recent release on the most recent minor (X.Y) release line, and serves as the base for each new minor release line. Development infrastructure that is not needed on `main` is maintained here, and can be merged out to other non-`main` branches as needed.
Changes on `main` are automatically included in a pull request to `dev` (see the (section on [branch sync](#branch-sync-automation)).
* `vX.Y-dev` is the minor release line development branch for X.Y, including both the initial X.Y.0 minor version and all subsequent X.Y.Z patch versions. All PRs are made to oldest active `vX.Y-dev` branch to which the change is relevant, and then merged forward as shown in the diagram further down in this document.
* `vX.Y.Z-rel` is the release branch for an X.Y.Z release (including when Z == 0). It exists primarily for `git mv`-ing `src/oas.md` to the appropriate `versions/X.Y.Z.md` location before merging back to `main`, and can also be used for any emergency post-release fixes that come up, such as when a 3rd party changes URLs in a way that breaks published links.

Expand Down Expand Up @@ -417,6 +424,15 @@ gitGraph TB:
commit id:"3.3 work"
```

### Branch sync automation

To keep changes in sync, we have some GitHub actions that open pull requests to take changes from `main` onto the `dev` branch, and from `dev` to each active version branch.

- `sync-main-to-dev` opens a pull request with all the changes from the `main` branch that aren't yet included on `dev`.
This needs a single approval from either maintainers or TSC and can be merged.
The aim is to bring build script and repository documentation changes to the other branches.
Published versions of the specifications and schemas will also move across branches with this approach.

## Appendix: Issue Automation

### Automated closure of issues Process
Expand Down
Loading