Skip to content

Commit 143c641

Browse files
authored
Merge pull request #4392 from OAI/main
dev: update from main
2 parents 9f113bd + bc7aaf3 commit 143c641

File tree

12 files changed

+359
-264
lines changed

12 files changed

+359
-264
lines changed

.github/templates/agenda.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Meetings take place over Zoom: [https://zoom.us/j/975841675](https://zoom.us/j/9
2020

2121
| Blur My Background | Raise Hand |
2222
|-|-|
23-
| <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"> |
23+
| <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"> |
2424

2525
### Agenda Structure
2626

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: check-restricted-files
2+
3+
# Author: @ralfhandl
4+
# Issue: https://github.com/OAI/OpenAPI-Specification/issues/3432
5+
6+
# This workflow fails if restricted files are changed in a pull request
7+
8+
on:
9+
pull_request:
10+
paths:
11+
- 'schemas/**/*.yaml'
12+
- 'versions/*.md'
13+
14+
jobs:
15+
check-files:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Check changed files
19+
shell: bash
20+
run: |
21+
echo This PR contains changes to files that should not be changed
22+
exit 1
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: sync-main-to-dev
2+
3+
# author: @ralfhandl
4+
5+
#
6+
# This workflow creates PRs to update the dev branch with the latest changes from main
7+
#
8+
9+
# run this on push to main
10+
on:
11+
push:
12+
branches:
13+
- main
14+
15+
jobs:
16+
sync-branch:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
22+
- name: Create pull request
23+
id: pull_request
24+
shell: bash
25+
run: |
26+
EXISTS=$(gh pr list --base $BASE --head $HEAD \
27+
--json number --jq '.[] | .number')
28+
if [ ! -z "$EXISTS" ]; then
29+
echo "PR #$EXISTS already wants to merge $HEAD into $BASE"
30+
exit 0
31+
fi
32+
33+
gh pr create --base $BASE --head $HEAD \
34+
--label "Housekeeping" \
35+
--title "$BASE: update from $HEAD" \
36+
--body "Merge \`$HEAD\` into \`$BASE\`."
37+
env:
38+
GH_TOKEN: ${{ github.token }}
39+
HEAD: main
40+
BASE: dev

CONTRIBUTING.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,13 +190,19 @@ Reviews requesting changes should have their changes addressed regardless of how
190190

191191
## Publishing
192192

193-
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`.
194-
The HTML versions of the OAS are automatically generated from the `versions` directory on `main`.
193+
### Specification Versions
194+
195+
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`.
195196
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).
196197

197-
The schemas are published [in the schema section on the spec site](https://spec.openapis.org/#openapi-specification-schemas).
198-
As part of the publishing process, the `WORK-IN-PROGRESS` placeholders are replaced with dates as appropriate.
199-
Schemas are published/updated independently from the specification releases.
198+
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).
199+
200+
### Schema Iterations
201+
202+
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).
203+
Schemas are updated in and directly published from the `vX.Y-dev` branches.
204+
205+
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.
200206

201207
## Release Process and Scope
202208

@@ -312,6 +318,7 @@ For information on the branch and release strategy for OAS 3.0.4 and 3.1.1 and e
312318

313319
* `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`.
314320
* `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.
321+
Changes on `main` are automatically included in a pull request to `dev` (see the (section on [branch sync](#branch-sync-automation)).
315322
* `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.
316323
* `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.
317324

@@ -430,6 +437,15 @@ gitGraph TB:
430437
commit id:"3.3 work"
431438
```
432439

440+
### Branch sync automation
441+
442+
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.
443+
444+
- `sync-main-to-dev` opens a pull request with all the changes from the `main` branch that aren't yet included on `dev`.
445+
This needs a single approval from either maintainers or TSC and can be merged.
446+
The aim is to bring build script and repository documentation changes to the other branches.
447+
Published versions of the specifications and schemas will also move across branches with this approach.
448+
433449
## Appendix: Issue Automation
434450

435451
### Automated closure of issues Process

0 commit comments

Comments
 (0)