Skip to content

Commit e5a1976

Browse files
authored
Merge pull request #7339 from dotnet/dev/jorobich/automate-snap-prs
Add GH workflow for snapping changes from one branch to another
2 parents dd0cd20 + 2ecbff8 commit e5a1976

File tree

3 files changed

+34
-0
lines changed

3 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: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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'

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
!.razorDevKit/**
99
!.razoromnisharp/**
1010
.rpt2_cache/**
11+
.config/**
1112
.github/**
1213
.vscode/**
1314
.vscode-test/**

0 commit comments

Comments
 (0)