Skip to content

Commit fdda823

Browse files
authored
add auto backport workflow (opensearch-project#172)
Signed-off-by: Amit Galitzky <amgalitz@amazon.com>
1 parent ef40275 commit fdda823

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/backport.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Backport
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
- labeled
7+
8+
jobs:
9+
backport:
10+
runs-on: ubuntu-latest
11+
name: Backport
12+
steps:
13+
- name: Backport
14+
uses: tibdex/backport@v1
15+
with:
16+
github_token: ${{ secrets.GITHUB_TOKEN }}

DEVELOPER_GUIDE.md

+8
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,11 @@ yarn prettier --write <relative file path>
7979
```
8080

8181
> NOTE: There also exists prettier plugins on several editors that allow for automatic reformatting on saving the file. However using this is discouraged as you must ensure that the plugin uses the correct version of prettier (listed in `package.json`) before using such a plugin.
82+
83+
### Backports
84+
85+
The Github workflow in [`backport.yml`](.github/workflows/backport.yml) creates backport PRs automatically when the
86+
original PR with an appropriate label `backport <backport-branch-name>` is merged to main with the backport workflow
87+
run successfully on the PR. For example, if a PR on main needs to be backported to `1.x` branch, add a label
88+
`backport 1.x` to the PR and make sure the backport workflow runs on the PR along with other checks. Once this PR is
89+
merged to main, the workflow will create a backport PR to the `1.x` branch.

0 commit comments

Comments
 (0)