Skip to content

Commit bd2f7ea

Browse files
Merge pull request #875 from microsoftgraph/rsh/supportBranch-protection
Add Support Branch protection
2 parents ab27ec2 + f6042fd commit bd2f7ea

File tree

8 files changed

+49
-11
lines changed

8 files changed

+49
-11
lines changed

.github/policies/msgraph-beta-sdk-java-branch-protection.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,40 @@ configuration:
4545
restrictsPushes: false
4646
# Restrict who can dismiss pull request reviews. boolean
4747
restrictsReviewDismissals: false
48+
49+
- branchNamePattern: support/5.x.x
50+
# This branch pattern applies to the following branches as of 02/14/2024 12:25
51+
# support/5.x.x
4852

53+
# Specifies whether this branch can be deleted. boolean
54+
allowsDeletions: false
55+
# Specifies whether forced pushes are allowed on this branch. boolean
56+
allowsForcePushes: false
57+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
58+
dismissStaleReviews: true
59+
# Specifies whether admins can overwrite branch protection. boolean
60+
isAdminEnforced: false
61+
# Indicates whether "Require a pull request before merging" is enabled. boolean
62+
requiresPullRequestBeforeMerging: true
63+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
64+
requiredApprovingReviewsCount: 1
65+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
66+
requireCodeOwnersReview: true
67+
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
68+
requiresCommitSignatures: false
69+
# Are conversations required to be resolved before merging? boolean
70+
requiresConversationResolution: true
71+
# Are merge commits prohibited from being pushed to this branch. boolean
72+
requiresLinearHistory: false
73+
# 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
74+
requiredStatusChecks:
75+
- license/cla
76+
- lint-api-level
77+
- CodeQL
78+
- build
79+
# Require branches to be up to date before merging. This should be false since the repo contains autogenerated files. boolean
80+
requiresStrictStatusChecks: false
81+
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
82+
restrictsPushes: false
83+
# Restrict who can dismiss pull request reviews. boolean
84+
restrictsReviewDismissals: false

.github/workflows/api-level-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: "Checks the SDK only using APIs from the targeted API level"
33
on:
44
workflow_dispatch:
55
push:
6-
branches: [ dev ]
6+
branches: [dev, support/5.x.x]
77
pull_request:
8-
branches: [ dev ]
8+
branches: [dev, support/5.x.x]
99

1010
jobs:
1111
lint-api-level:

.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: [ dev ]
16+
branches: [dev, support/5.x.x]
1717
pull_request:
1818
# The branches below must be a subset of the branches above
19-
branches: [ dev ]
19+
branches: [dev, support/5.x.x]
2020
schedule:
2121
- cron: '0 1 * * 4'
2222
workflow_dispatch:

.github/workflows/conflicting-pr-label.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ name: PullRequestConflicting
66
# events but only for the master branch
77
on:
88
push:
9-
branches: [ master, dev ]
9+
branches: [master, dev, support/5.x.x]
1010
pull_request:
1111
types: [synchronize]
12-
branches: [ master, dev ]
12+
branches: [master, dev, support/5.x.x]
1313

1414
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1515
jobs:

.github/workflows/git-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
jobs:
1010
Git_Release:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
1214
steps:
1315
- uses: actions/checkout@v4
1416
- name: Download Build Artifact

.github/workflows/gradle-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Gradle Build and Compare Package
22

33
on:
44
push:
5-
branches: [ dev ]
5+
branches: [dev, support/5.x.x]
66
pull_request:
7-
branches: [ dev ]
7+
branches: [dev, support/5.x.x]
88
paths-ignore:
99
- '.gradle/wrapper'
1010
- '.gitignore'

.github/workflows/preview-and-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Maven Preview and Github Release
22

33
on:
44
push:
5-
branches: [ dev ]
5+
branches: [dev, support/5.x.x]
66
paths-ignore:
77
- '.gradle/wrapper'
88
- '.gitignore'

Scripts/incrementMinorVersion.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ function Update-MinorVersionNumber([version]$currentVersion) {
5454
function Update-MinorVersion() {
5555
$readmeFilePath = Join-Path -Path $PWD.ToString() -ChildPath "../README.md"
5656
$propertiesFilePath = Join-Path -Path $PWD.ToString() -ChildPath "../gradle.properties"
57-
$telemetryFilePath = Join-Path -Path $PWD.ToString() -ChildPath "../src/main/java/com/microsoft/graph/info/Constants.java"
57+
$telemetryFilePath = Join-Path -Path $PWD.ToString() -ChildPath "../src/main/java/com/microsoft/graph/beta/info/Constants.java"
5858
$currentVersion = Get-CurrentTelemetryVersion -telemetryFilePath $telemetryFilePath
5959
$nextVersion = Update-MinorVersionNumber -currentVersion $currentVersion
6060
Update-ReadmeVersion -version $nextVersion -readmeFilePath $readmeFilePath
6161
Update-TelemetryVersion -version $nextVersion -telemetryFilePath $telemetryFilePath
6262
Update-PackageVersion -version $nextVersion -propertiesFilePath $propertiesFilePath
6363
}
64-
Update-MinorVersion
64+
Update-MinorVersion

0 commit comments

Comments
 (0)