Skip to content

Commit 9dc4144

Browse files
authored
Add GH workflow for snapping changes from one branch to another
1 parent a3d678e commit 9dc4144

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.config/snap-flow.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// ONLY THE VERSION OF THIS FILE IN THE MAIN BRANCH IS USED!
2+
{
3+
"merge-flow-configurations": {
4+
// format of this section is
5+
// "source-branch-name": {
6+
// "MergeToBranch": "target-branch-name"
7+
// },
8+
"main": {
9+
// The MergeToBranch property should be presented in the object in order the merge flow to work
10+
"MergeToBranch": "prerelease",
11+
// ExtraSwitches is an optional parameter which is accepted by the script: https://github.com/dotnet/arcade/blob/main/.github/workflows/inter-branch-merge-base.yml. Accepted values are similar to the values from the version file: https://github.com/dotnet/versions/blob/main/Maestro/subscriptions.json
12+
"ExtraSwitches": "-QuietComments"
13+
},
14+
"prerelease": {
15+
"MergeToBranch": "release",
16+
// ExtraSwitches is an optional parameter which is accepted by the script: https://github.com/dotnet/arcade/blob/main/.github/workflows/inter-branch-merge-base.yml. Accepted values are similar to the values from the version file: https://github.com/dotnet/versions/blob/main/Maestro/subscriptions.json
17+
"ExtraSwitches": "-QuietComments"
18+
}
19+
}
20+
}

.github/workflows/branch-snap.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Branch snap
2+
on:
3+
workflow_dispatch
4+
5+
permissions:
6+
contents: write
7+
pull-requests: write
8+
9+
jobs:
10+
check-script:
11+
uses: dotnet/arcade/.github/workflows/inter-branch-merge-base.yml@main
12+
with:
13+
configuration_file_path: '.config/snap-flow.json'
14+
configuration_file_branch: 'custom-branch-if-needed'

0 commit comments

Comments
 (0)