diff --git a/.github/workflows/backport.yaml b/.github/workflows/backport.yaml new file mode 100644 index 00000000000..a4e98745368 --- /dev/null +++ b/.github/workflows/backport.yaml @@ -0,0 +1,21 @@ +name: Backport PR to branch +on: + issue_comment: + types: [created] + +permissions: + contents: write + issues: write + pull-requests: write + actions: write + +jobs: + backport: + uses: dotnet/arcade/.github/workflows/backport-base.yml@main + with: + pr_description_template: | + Backport of #%source_pr_number% to %target_branch% + + Requested in: %source_pr_url%#issuecomment-%trigger_comment_id% + + /cc %cc_users% diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c00f1c81ad9..5b14783a7ed 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,6 +8,22 @@ When you submit a pull request, a CLA-bot will automatically determine whether y If you want to submit a feature or a substantial code contribution, please discuss it first with the the team by [filing an issue](https://github.com/dotnet/project-system/issues/new), making sure it follows our [Roadmap](docs/repo/roadmap.md). +## Backporting Changes + +To backport a merged pull request to a release branch, add a comment to the PR with the following format: + +``` +/backport to +``` + +For example, to backport to the `dev17.13.x` branch: + +``` +/backport to dev17.13.x +``` + +The backport action will automatically create a new PR targeting the specified branch. This command is only available to users with Write or Admin permissions on the repository. Available release branches include `dev17.13.x`, `dev17.9.x`, `dev17.8.x`, `dev17.7.x`, `dev17.4.x`, and `dev16.11.x`. + For additional information, see the following: - [Getting Started](docs/repo/getting-started.md)