Skip to content

Conversation

OhZedTee
Copy link
Contributor

@OhZedTee OhZedTee commented Jul 8, 2021

As discussed in Issue #1897, Github's official statement is as follows:

.
.
.

What's going on here is this: sometimes when we deprecate a field, 
we keep both the new field and the deprecated field in order to prevent 
introducing breaking changes.

Although I can't provide a lot of context for why, 
Repository.open_issues is the deprecated field, 
and Repository.open_issues_count is the current field.

Interestingly, both Repository.watchers and Repository.watchers_count 
are deprecated, and the current field is actually Repository.stargazers_count.

In short: what used to be known as "Watching" was changed to mean "Starring".
As a result of that, watchers, watchers_count and stargazers_count all 
correspond to the number of users that have starred a repository, 
while subscribers_count corresponds to the number of watchers.

A bit more context on the watcher/stargazer/subscriber change can be found here:

https://developer.github.com/changes/2012-09-05-watcher-api/

Please take a look and let me know if you'd like me to make any changes to the documentation.

@google-cla google-cla bot added the cla: yes Indication that the PR author has signed a Google Contributor License Agreement. label Jul 8, 2021
@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #1952 (0dbc7e0) into master (c26abbd) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1952   +/-   ##
=======================================
  Coverage   97.65%   97.65%           
=======================================
  Files         105      105           
  Lines        6786     6786           
=======================================
  Hits         6627     6627           
  Misses         86       86           
  Partials       73       73           
Impacted Files Coverage Δ
github/repos.go 98.70% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c26abbd...0dbc7e0. Read the comment docs.

@OhZedTee
Copy link
Contributor Author

OhZedTee commented Jul 8, 2021

@gmlewis Here is the PR we chatted about for documenting the Repository object's deprecated fields

@OhZedTee OhZedTee changed the title Repository Deprecated Fields Repository Object - Deprecated Fields Jul 8, 2021
Copy link
Collaborator

@gmlewis gmlewis left a comment

Choose a reason for hiding this comment

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

Thank you, @OhZedTee !
LGTM.
Merging.

@gmlewis gmlewis merged commit 72cc2f6 into google:master Jul 8, 2021
@OhZedTee OhZedTee deleted the repository_alert_fix branch July 8, 2021 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indication that the PR author has signed a Google Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants