@@ -39,8 +39,8 @@ func (w WeeklyStats) String() string {
39
39
// deletions and commit counts.
40
40
//
41
41
// If this is the first time these statistics are requested for the given
42
- // repository, this method will return a non-nil error and a status code of
43
- // 202. This is because this is the status that github returns to signify that
42
+ // repository, this method will return an *AcceptedError and a status code of
43
+ // 202. This is because this is the status that GitHub returns to signify that
44
44
// it is now computing the requested statistics. A follow up request, after a
45
45
// delay of a second or so, should result in a successful request.
46
46
//
@@ -78,8 +78,8 @@ func (w WeeklyCommitActivity) String() string {
78
78
// starting on Sunday.
79
79
//
80
80
// If this is the first time these statistics are requested for the given
81
- // repository, this method will return a non-nil error and a status code of
82
- // 202. This is because this is the status that github returns to signify that
81
+ // repository, this method will return an *AcceptedError and a status code of
82
+ // 202. This is because this is the status that GitHub returns to signify that
83
83
// it is now computing the requested statistics. A follow up request, after a
84
84
// delay of a second or so, should result in a successful request.
85
85
//
@@ -104,6 +104,12 @@ func (s *RepositoriesService) ListCommitActivity(owner, repo string) ([]*WeeklyC
104
104
// deletions pushed to a repository. Returned WeeklyStats will contain
105
105
// additions and deletions, but not total commits.
106
106
//
107
+ // If this is the first time these statistics are requested for the given
108
+ // repository, this method will return an *AcceptedError and a status code of
109
+ // 202. This is because this is the status that GitHub returns to signify that
110
+ // it is now computing the requested statistics. A follow up request, after a
111
+ // delay of a second or so, should result in a successful request.
112
+ //
107
113
// GitHub API Docs: https://developer.github.com/v3/repos/statistics/#code-frequency
108
114
func (s * RepositoriesService ) ListCodeFrequency (owner , repo string ) ([]* WeeklyStats , * Response , error ) {
109
115
u := fmt .Sprintf ("repos/%v/%v/stats/code_frequency" , owner , repo )
@@ -152,11 +158,10 @@ func (r RepositoryParticipation) String() string {
152
158
// The array order is oldest week (index 0) to most recent week.
153
159
//
154
160
// If this is the first time these statistics are requested for the given
155
- // repository, this method will return a non-nil error and a status code
156
- // of 202. This is because this is the status that github returns to
157
- // signify that it is now computing the requested statistics. A follow
158
- // up request, after a delay of a second or so, should result in a
159
- // successful request.
161
+ // repository, this method will return an *AcceptedError and a status code of
162
+ // 202. This is because this is the status that GitHub returns to signify that
163
+ // it is now computing the requested statistics. A follow up request, after a
164
+ // delay of a second or so, should result in a successful request.
160
165
//
161
166
// GitHub API Docs: https://developer.github.com/v3/repos/statistics/#participation
162
167
func (s * RepositoriesService ) ListParticipation (owner , repo string ) (* RepositoryParticipation , * Response , error ) {
@@ -185,6 +190,12 @@ type PunchCard struct {
185
190
186
191
// ListPunchCard returns the number of commits per hour in each day.
187
192
//
193
+ // If this is the first time these statistics are requested for the given
194
+ // repository, this method will return an *AcceptedError and a status code of
195
+ // 202. This is because this is the status that GitHub returns to signify that
196
+ // it is now computing the requested statistics. A follow up request, after a
197
+ // delay of a second or so, should result in a successful request.
198
+ //
188
199
// GitHub API Docs: https://developer.github.com/v3/repos/statistics/#punch-card
189
200
func (s * RepositoriesService ) ListPunchCard (owner , repo string ) ([]* PunchCard , * Response , error ) {
190
201
u := fmt .Sprintf ("repos/%v/%v/stats/punch_card" , owner , repo )
0 commit comments