Skip to content

docs: Deprecate removed Repository fields - #4684

Merged
gmlewis merged 3 commits into
google:masterfrom
nakultt:docs/deprecate-repo-fields
Oct 29, 2026
Merged

gmlewis merged 3 commits into
google:masterfrom
nakultt:docs/deprecate-repo-fields

Conversation

@nakultt

@nakultt nakultt commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Updates #4077.

GitHub REST API version 2026-03-10 removed has_downloads and use_squash_pr_title_as_default from repository objects. As discussed in #4138, the fields are kept for older API versions and GHES, and are marked Deprecated: instead:

  • Repository.HasDownloads
  • Repository.UseSquashPRTitleAsDefault and CreateRepositoryRequest.UseSquashPRTitleAsDefault (use SquashMergeCommitTitle instead)

I used trailing comments, matching the existing deprecated fields in Repository (OpenIssues, Watchers), to avoid realigning the whole struct.

Mark HasDownloads and UseSquashPRTitleAsDefault as deprecated, since
GitHub REST API version 2026-03-10 removed them. The fields are kept
for older API versions and GHES.

Updates google#4077.
@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Oct 28, 2026

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @nakultt!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @Not-Dhananjay-Mishra

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.64%. Comparing base (7b235bc) to head (a74e539).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4684   +/-   ##
=======================================
  Coverage   98.64%   98.64%           
=======================================
  Files         202      202           
  Lines       19004    19004           
=======================================
  Hits        18746    18746           
  Misses        258      258           

☔ 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.

Comment thread github/repos.go Outdated
SquashMergeCommitMessage *string `json:"squash_merge_commit_message,omitempty"` // Can be one of: "PR_BODY", "COMMIT_MESSAGES", "BLANK"
MergeCommitTitle *string `json:"merge_commit_title,omitempty"` // Can be one of: "PR_TITLE", "MERGE_MESSAGE"
MergeCommitMessage *string `json:"merge_commit_message,omitempty"` // Can be one of: "PR_BODY", "PR_TITLE", "BLANK"
UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` // Deprecated: Removed in API version 2026-03-10. Use SquashMergeCommitTitle instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` // Deprecated: Removed in API version 2026-03-10. Use SquashMergeCommitTitle instead.
UseSquashPRTitleAsDefault *bool `json:"use_squash_pr_title_as_default,omitempty"` // Deprecated: GitHub REST API version 2026-03-10 removes the UseSquashPRTitleAsDefault field. Use SquashMergeCommitTitle instead.

For consistency with the rest of the repo. Same applies to the other newly added deprecation comments.

// Deprecated: GitHub REST API version 2026-03-10 removed the singular assignee field.
// Use Assignees instead.
Assignee *User `json:"assignee,omitempty"`

// Deprecated: GitHub REST API version 2026-03-10 removed the singular assignee field.
// Use Assignees instead.
Assignee *User `json:"assignee,omitempty"`

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Oct 29, 2026
@gmlewis
gmlewis merged commit a0e547e into google:master Oct 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants