From 66a1f12ff620e5f0e5fbacdaa3bc135d5e4c76fd Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Oct 2025 15:20:16 -0400 Subject: [PATCH 1/2] ci: adds definitions for support/v2 branch Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 2 ++ .../OpenAPI.NET-branch-protection.yml | 36 +++++++++++++++++++ .github/release-please.yml | 3 ++ .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/release-please-gha.yml | 1 + 5 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index 1f4c7a41e..e11dd0893 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -7,6 +7,7 @@ trigger: include: - main - support/v1 + - support/v2 tags: include: - 'v*' @@ -15,6 +16,7 @@ pr: include: - main - support/v1 + - support/v2 variables: buildPlatform: 'Any CPU' diff --git a/.github/policies/OpenAPI.NET-branch-protection.yml b/.github/policies/OpenAPI.NET-branch-protection.yml index 6deeb87fa..2d8fd2a73 100644 --- a/.github/policies/OpenAPI.NET-branch-protection.yml +++ b/.github/policies/OpenAPI.NET-branch-protection.yml @@ -81,3 +81,39 @@ configuration: # Restrict who can dismiss pull request reviews. boolean restrictsReviewDismissals: false + - branchNamePattern: support/v2 + # This branch pattern applies to the following branches as of approximately 02/27/2025 15:28:20: + # support/v1 + + # Specifies whether this branch can be deleted. boolean + allowsDeletions: false + # Specifies whether forced pushes are allowed on this branch. boolean + allowsForcePushes: false + # Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean + dismissStaleReviews: true + # Specifies whether admins can overwrite branch protection. boolean + isAdminEnforced: true + # Indicates whether "Require a pull request before merging" is enabled. boolean + requiresPullRequestBeforeMerging: true + # Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required + requiredApprovingReviewsCount: 1 + # Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean + requireCodeOwnersReview: true + # Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines. + requiresCommitSignatures: false + # Are conversations required to be resolved before merging? boolean + requiresConversationResolution: true + # Are merge commits prohibited from being pushed to this branch. boolean + requiresLinearHistory: false + # 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 + requiredStatusChecks: + - license/cla + - CodeQL + - Continuous Integration + # Require branches to be up to date before merging. boolean + requiresStrictStatusChecks: false + # Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush. + restrictsPushes: false + # Restrict who can dismiss pull request reviews. boolean + restrictsReviewDismissals: false + diff --git a/.github/release-please.yml b/.github/release-please.yml index c821fc166..ce23f6ec0 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -3,5 +3,8 @@ primaryBranch: main handleGHRelease: true branches: - branch: support/v1 + manifest: true + handleGHRelease: true + - branch: support/v2 manifest: true handleGHRelease: true \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9839c4904..ac897fd86 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,7 +2,7 @@ name: CodeQL Analysis on: push: - branches: [ main, support/v1 ] + branches: [ main, support/v1, support/v2 ] pull_request: schedule: - cron: '0 8 * * *' diff --git a/.github/workflows/release-please-gha.yml b/.github/workflows/release-please-gha.yml index a730548a2..173b15cbb 100644 --- a/.github/workflows/release-please-gha.yml +++ b/.github/workflows/release-please-gha.yml @@ -15,6 +15,7 @@ on: branches: - main - support/v1 + - support/v2 jobs: release: From 50f7fc0b7688e3f77737d34bdd54bbb8e6959013 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Thu, 2 Oct 2025 15:21:24 -0400 Subject: [PATCH 2/2] ci: adds missing condition for github releases Signed-off-by: Vincent Biret --- .azure-pipelines/ci-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.azure-pipelines/ci-build.yml b/.azure-pipelines/ci-build.yml index e11dd0893..8921e7112 100644 --- a/.azure-pipelines/ci-build.yml +++ b/.azure-pipelines/ci-build.yml @@ -309,6 +309,7 @@ extends: publishFeedCredentials: 'OpenAPI Nuget Connection' - deployment: create_github_release + condition: and(contains(variables['build.SourceBranch'], 'refs/tags/v'), succeeded()) templateContext: type: releaseJob isProduction: true