From d0f7d75929dc606153589e9987788136f802ad51 Mon Sep 17 00:00:00 2001 From: Jonathan Flat Date: Fri, 16 Oct 2026 17:12:07 -0600 Subject: [PATCH] Add automerger workflow from release/1.8.x to main --- .github/workflows/automerge_to_main.yml | 20 ++++++++++++++++++++ .github/workflows/pull_request.yml | 2 +- README.md | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/automerge_to_main.yml diff --git a/.github/workflows/automerge_to_main.yml b/.github/workflows/automerge_to_main.yml new file mode 100644 index 0000000..ec295ff --- /dev/null +++ b/.github/workflows/automerge_to_main.yml @@ -0,0 +1,20 @@ +name: Create PR to merge release branch into the main branch +# Changes should land on the earliest release branch they will need to ship on and then be automatically forwarded to main +permissions: + contents: read +on: + schedule: + - cron: '0 9 * * *' + workflow_dispatch: +jobs: + create_merge_pr: + name: Create PR to merge release branch into main branch + uses: swiftlang/github-workflows/.github/workflows/create_automerge_pr.yml@0.0.15 + with: + base_branch: main + head_branch: release/1.8.x + pr_message: This PR was automatically opened by a GitHub action. Review the changes included in this PR and determine if they should be included on main. If yes, merge the PR. Otherwise revert changes that should not be included on this branch. + permissions: + contents: write + pull-requests: write + if: (github.event_name == 'schedule' && github.repository == 'apple/swift-system') || (github.event_name != 'schedule') # Ensure that we don't run this on a schedule in a fork diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ca6fbea..88c5e25 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -5,7 +5,7 @@ permissions: on: pull_request: - types: [opened, reopened, synchronize] + types: [opened, reopened, synchronize, ready_for_review] jobs: tests: diff --git a/README.md b/README.md index bc8db5a..c4c2ad3 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ Changes must land on the branch corresponding to the earliest release that they `release/1.7.0` → `release/1.8.x` → `main` -For example, anything landing on `release/1.6.0` will eventually appear on `release/1.7.0`, then `release/1.8.x` and finally `main` as well. There is no need to file standalone PRs for each release line. (Change propagation currently requires manual work -- it is performed by project maintainers.) +For example, anything landing on `release/1.7.0` will eventually appear on `release/1.8.x` and finally `main` as well. There is no need to file standalone PRs for each release line. (Merges into `main` are performed by the [automerger](.github/workflows/automerge_to_main.yml); propagation between release branches is performed by project maintainers.) ### Code of Conduct