Skip to content

Commit a77aee6

Browse files
authored
Merge pull request #324 from mpysiak/SYL-4175-upmerge-ga
Upmerge GA
2 parents 0a444b1 + 64866ce commit a77aee6

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/upmerge_pr.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Upmerge PR
2+
3+
on:
4+
schedule:
5+
-
6+
cron: "0 2 * * *"
7+
workflow_dispatch: ~
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
upmerge:
15+
runs-on: ubuntu-latest
16+
if: github.repository == 'Sylius/PayPalPlugin'
17+
name: "Upmerge PR"
18+
timeout-minutes: 5
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
-
24+
base_branch: "1.7"
25+
target_branch: "2.0"
26+
27+
steps:
28+
-
29+
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ matrix.target_branch }}
32+
33+
-
34+
name: Reset upmerge branch
35+
run: |
36+
git fetch origin ${{ matrix.base_branch }}:${{ matrix.base_branch }}
37+
git reset --hard ${{ matrix.base_branch }}
38+
39+
-
40+
name: Create Pull Request
41+
uses: peter-evans/create-pull-request@v4
42+
with:
43+
token: ${{ secrets.SYLIUS_BOT_PAT }}
44+
title: '[UPMERGE] ${{ matrix.base_branch }} -> ${{ matrix.target_branch }}'
45+
body: |
46+
This PR has been generated automatically.
47+
For more details see [upmerge_pr.yaml](/Sylius/PayPalPlugin/blob/1.7/.github/workflows/upmerge_pr.yaml).
48+
49+
**Remember!** The upmerge should always be merged with using `Merge pull request` button.
50+
51+
In case of conflicts, please resolve them manually with usign the following commands:
52+
```
53+
git fetch upstream
54+
gh pr checkout <this-pr-number>
55+
git merge upstream/${{ matrix.target_branch }} -m "Resolve conflicts between ${{ matrix.base_branch }} and ${{ matrix.target_branch }}"
56+
```
57+
58+
If you use other name for the upstream remote, please replace `upstream` with the name of your remote pointing to the `Sylius/PayPalPlugin` repository.
59+
60+
Once the conflicts are resolved, please run `git merge --continue` and push the changes to this PR.
61+
branch: "upmerge/${{ matrix.base_branch }}_${{ matrix.target_branch }}"
62+
delete-branch: true
63+
base: ${{ matrix.target_branch }}

0 commit comments

Comments
 (0)