Skip to content

Commit b2ecd5f

Browse files
Set up /backport action command (#9800)
* Initial plan * Add /backport action command to GitOps configuration Co-authored-by: LittleLittleCloud <[email protected]> * Add backport documentation to CONTRIBUTING.md Co-authored-by: LittleLittleCloud <[email protected]> * Add backport workflow for PRs * Revert CONTRIBUTING.md and resourceManagement.yml changes, keep only backport.yaml Co-authored-by: LittleLittleCloud <[email protected]> * Restore CONTRIBUTING.md documentation and add comment link to backport PR template Co-authored-by: LittleLittleCloud <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: LittleLittleCloud <[email protected]> Co-authored-by: Xiaoyun Zhang <[email protected]>
1 parent f75543e commit b2ecd5f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/backport.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Backport PR to branch
2+
on:
3+
issue_comment:
4+
types: [created]
5+
6+
permissions:
7+
contents: write
8+
issues: write
9+
pull-requests: write
10+
actions: write
11+
12+
jobs:
13+
backport:
14+
uses: dotnet/arcade/.github/workflows/backport-base.yml@main
15+
with:
16+
pr_description_template: |
17+
Backport of #%source_pr_number% to %target_branch%
18+
19+
Requested in: %source_pr_url%#issuecomment-%trigger_comment_id%
20+
21+
/cc %cc_users%

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ When you submit a pull request, a CLA-bot will automatically determine whether y
88

99
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).
1010

11+
## Backporting Changes
12+
13+
To backport a merged pull request to a release branch, add a comment to the PR with the following format:
14+
15+
```
16+
/backport to <branch-name>
17+
```
18+
19+
For example, to backport to the `dev17.13.x` branch:
20+
21+
```
22+
/backport to dev17.13.x
23+
```
24+
25+
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`.
26+
1127
For additional information, see the following:
1228

1329
- [Getting Started](docs/repo/getting-started.md)

0 commit comments

Comments
 (0)