Skip to content

refactor!: Rename CustomDeploymentProtectionRuleRequest to CreateCustomDeploymentProtectionRuleRequest and pass it by value - #4712

Open
JamBalaya56562 wants to merge 1 commit into
google:masterfrom
JamBalaya56562:refactor/3644-create-custom-deployment-protection-rule-request
Open

JamBalaya56562 wants to merge 1 commit into
google:masterfrom
JamBalaya56562:refactor/3644-create-custom-deployment-protection-rule-request

Conversation

@JamBalaya56562

Copy link
Copy Markdown
Contributor

Updates #3644.

BREAKING CHANGE: CustomDeploymentProtectionRuleRequest is renamed to CreateCustomDeploymentProtectionRuleRequest; RepositoriesService.CreateCustomDeploymentProtectionRule now takes it by value.

This PR:

  • Renames CustomDeploymentProtectionRuleRequest to CreateCustomDeploymentProtectionRuleRequest to match CreateCustomDeploymentProtectionRule (like ReviewCustomDeploymentProtectionRuleRequest).
  • Passes it by value and removes it from body-allowed-pointer-types in .golangci.yml.

The request schema of POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules has no required properties, so IntegrationID stays a *int64 with omitempty. The deployment-protection-rule response schema already matches CustomDeploymentProtectionRule.

…ustomDeploymentProtectionRuleRequest` and pass it by value

BREAKING CHANGE: `CustomDeploymentProtectionRuleRequest` is renamed to `CreateCustomDeploymentProtectionRuleRequest`; `RepositoriesService.CreateCustomDeploymentProtectionRule` now takes it by value.
@gmlewis gmlewis added NeedsReview PR is awaiting a review before merging. Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). labels Nov 10, 2026
@codecov

codecov Bot commented Nov 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (b49f19e) to head (2a6086d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4712   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files         204      204           
  Lines       19154    19154           
=======================================
  Hits        18895    18895           
  Misses        259      259           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking API Change PR will require a bump to the major version num in next release. Look here to see the change(s). NeedsReview PR is awaiting a review before merging.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants