Skip to content

Commit bfc3f8a

Browse files
authored
Merge pull request #4411 from OAI/main
dev: update from main
2 parents 143c641 + 79ff798 commit bfc3f8a

File tree

2 files changed

+50
-3
lines changed

2 files changed

+50
-3
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: sync-dev-to-vX.Y-dev
2+
3+
# author: @ralfhandl
4+
5+
#
6+
# This workflow creates PRs to update the vX.Y-dev branch with the latest changes from dev
7+
#
8+
9+
# run this on push to dev
10+
on:
11+
push:
12+
branches:
13+
- dev
14+
15+
jobs:
16+
sync-branches:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Create pull requests
25+
id: pull_requests
26+
shell: bash
27+
run: |
28+
DEV_BRANCHES=$(git branch -r --list origin/v?.?-dev)
29+
for DEV_BRANCH in $DEV_BRANCHES; do
30+
BASE=${DEV_BRANCH:7}
31+
EXISTS=$(gh pr list --base $BASE --head $HEAD \
32+
--json number --jq '.[] | .number')
33+
if [ ! -z "$EXISTS" ]; then
34+
echo "PR #$EXISTS already wants to merge $HEAD into $BASE"
35+
continue
36+
fi
37+
38+
gh pr create --base $BASE --head $HEAD \
39+
--label "Housekeeping" \
40+
--title "$BASE: update from $HEAD" \
41+
--body "Merge \`$HEAD\` into \`$BASE\`."
42+
done
43+
env:
44+
GH_TOKEN: ${{ github.token }}
45+
HEAD: dev

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,11 @@ gitGraph TB:
442442
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.
443443

444444
- `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.
445+
- `sync-dev-to-vX.Y-dev` opens pull requests with all the changes from `dev` that aren't yet included on the corresponding `vX.Y-dev` branch.
446+
447+
These need a single approval from either maintainers or TSC and can be merged.
448+
The aim is to bring build script and repository documentation changes to the other branches.
449+
Published versions of the specifications and schemas will also move across branches with this approach.
448450

449451
## Appendix: Issue Automation
450452

0 commit comments

Comments
 (0)