Skip to content

Commit cbff435

Browse files
authored
Merge pull request #2612 from Matejkob/release-pr-template
Add "Opening a PR for Release Branch" section to contributing document
2 parents a85aa07 + dc5e2b7 commit cbff435

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
* **Explanation**: <!-- A description of the issue being fixed or enhancement being made. This can be brief, but it should be clear. -->
2+
* **Scope**: <!-- An assessment of the impact/importance of the change. For example, is the change a source-breaking language change, etc. -->
3+
* **Issue**: <!-- The GitHub Issue link if the change fixes/implements an issue/enhancement -->
4+
* **Original PR**: <!-- Pull Request link from main branch -->
5+
* **Risk**: <!-- What is the (specific) risk to the release for taking this change? -->
6+
* **Testing**: <!-- What specific testing has been done or needs to be done to further validate any impact of this change? -->
7+
* **Reviewer**: <!-- One or more code owners for the impacted components should review the change. Technical review can be delegated by a code owner or otherwise requested as deemed appropriate or useful. -->

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,34 @@ For more information and instructions, read the GitHub docs on [forking a repo](
7979

8080
Once you've pushed your branch, you should see an option on this repository's page to create a PR from a branch in your fork.
8181

82+
## Opening a PR for Release Branch
83+
84+
In order for a pull request to be considered for inclusion in a release branch (e.g. `release/6.0`) after it has been cut, it must meet the following requirements:
85+
86+
1. The title of the PR should start with the tag `[{swift version number}]`. For example, `[6.0]` for the Swift 6.0 release branch.
87+
88+
1. The PR description must include the following information:
89+
90+
```md
91+
* **Explanation**: A description of the issue being fixed or enhancement being made. This can be brief, but it should be clear.
92+
* **Scope**: An assessment of the impact/importance of the change. For example, is the change a source-breaking language change, etc.
93+
* **Issue**: The GitHub Issue link if the change fixes/implements an issue/enhancement.
94+
* **Original PR**: Pull Request link from the `main` branch.
95+
* **Risk**: What is the (specific) risk to the release for taking this change?
96+
* **Testing**: What specific testing has been done or needs to be done to further validate any impact of this change?
97+
* **Reviewer**: One or more code owners for the impacted components should review the change. Technical review can be delegated by a code owner or otherwise requested as deemed appropriate or useful.
98+
```
99+
100+
> [!TIP]
101+
> The PR description can be generated using the [release_branch.md](https://github.com/apple/swift-syntax/blob/main/.github/PULL_REQUEST_TEMPLATE/release_branch.md) [pull request template](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/about-issue-and-pull-request-templates). To use this template when creating a PR, you need to add the query parameter:
102+
> ```
103+
> ?expand=1&template=release_branch.md
104+
> ```
105+
> to the PR URL, as described in the [GitHub documentation on using query parameters to create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/using-query-parameters-to-create-a-pull-request).
106+
> This is necessary because GitHub does not currently provide a UI to choose a PR template.
107+
108+
All changes going into a release branch must go through pull requests that are approved and merged by the corresponding release manager.
109+
82110
## Review and CI Testing
83111

84112
After you opened your PR, a maintainer will review it and test your changes in CI (*Continuous Integration*) by adding a `@swift-ci Please test` comment on the pull request. Once your PR is approved and CI has passed, the maintainer will merge your pull request.

0 commit comments

Comments
 (0)