Skip to content

Commit e6241db

Browse files
committed
ci: adds support v1 branch policies
Signed-off-by: Vincent Biret <[email protected]>
1 parent 0e354cb commit e6241db

File tree

4 files changed

+43
-4
lines changed

4 files changed

+43
-4
lines changed

.azure-pipelines/ci-build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ trigger:
77
branches:
88
include:
99
- main
10+
- support/v1
1011
pr:
1112
branches:
1213
include:
1314
- main
15+
- support/v1
1416

1517
variables:
1618
buildPlatform: 'Any CPU'
@@ -145,7 +147,7 @@ extends:
145147

146148
- task: PowerShell@2
147149
displayName: 'Validate project version has been incremented'
148-
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
150+
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'), contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
149151
inputs:
150152
targetType: 'filePath'
151153
filePath: $(System.DefaultWorkingDirectory)\scripts\ValidateProjectVersionUpdated.ps1
@@ -186,7 +188,7 @@ extends:
186188
PendingAnalysisWaitTimeoutMinutes: '5'
187189

188190
- stage: deploy
189-
condition: and(contains(variables['build.sourceBranch'], 'refs/heads/main'), succeeded())
191+
condition: and(or(contains(variables['build.sourceBranch'], 'refs/heads/main'), contains(variables['build.sourceBranch'], 'refs/heads/support/v1')), succeeded())
190192
dependsOn: build
191193
jobs:
192194
- deployment: deploy

.github/policies/OpenAPI.NET.OData-branch-protection.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,42 @@ configuration:
1313
# This branch pattern applies to the following branches as of 06/09/2024 20:45:44:
1414
# main
1515

16+
# Specifies whether this branch can be deleted. boolean
17+
allowsDeletions: false
18+
# Specifies whether forced pushes are allowed on this branch. boolean
19+
allowsForcePushes: false
20+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
21+
dismissStaleReviews: true
22+
# Specifies whether admins can overwrite branch protection. boolean
23+
isAdminEnforced: false
24+
# Indicates whether "Require a pull request before merging" is enabled. boolean
25+
requiresPullRequestBeforeMerging: true
26+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
27+
requiredApprovingReviewsCount: 1
28+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
29+
requireCodeOwnersReview: true
30+
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
31+
requiresCommitSignatures: false
32+
# Are conversations required to be resolved before merging? boolean
33+
requiresConversationResolution: true
34+
# Are merge commits prohibited from being pushed to this branch. boolean
35+
requiresLinearHistory: false
36+
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
37+
requiredStatusChecks:
38+
- license/cla
39+
- Continuous Integration
40+
- CodeQL
41+
# Require branches to be up to date before merging. This should be false since the repo contains autogenerated files. boolean
42+
requiresStrictStatusChecks: false
43+
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
44+
restrictsPushes: false
45+
# Restrict who can dismiss pull request reviews. boolean
46+
restrictsReviewDismissals: false
47+
48+
- branchNamePattern: support/v1
49+
# This branch pattern applies to the following branches as of 06/09/2024 20:45:44:
50+
# support/v1
51+
1652
# Specifies whether this branch can be deleted. boolean
1753
allowsDeletions: false
1854
# Specifies whether forced pushes are allowed on this branch. boolean

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ name: "CodeQL"
1313

1414
on:
1515
push:
16-
branches: [ main ]
16+
branches: [ main, support/v1 ]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ main ]
19+
branches: [ main, support/v1 ]
2020
schedule:
2121
- cron: '32 2 * * 6'
2222
workflow_dispatch:

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
- support/v1
78
paths-ignore: ['.vscode/**']
89
pull_request:
910
types: [opened, synchronize, reopened]

0 commit comments

Comments
 (0)