Dmitri Shuralyov
136ef5cdab
Put sync.Mutex on top of variables it protects.
This change makes the code more consistent with the rateMu below.
This is a followup to https://github.com/google/go-github/pull/390#discussion_r68863652 .
Closes #396 .
Change-Id: I0fc8b280911f9171fb4d8e3fa60cf6d53b64a65b
10 years ago
Glenn Lewis
53a129e94c
Sync doc.go and README.md
Fixes #397 .
Change-Id: I30ce336e3a36cf5758b9bf52b9dd77f7c1df5f27
10 years ago
Glenn Lewis
f6f75a742a
add Carlos Alexandro Becker as contributor
Change-Id: I9668e8806934438062bac3f34e4759d44b5f63f4
10 years ago
Carlos Alexandro Becker
878df980b6
Add missing ID fields to PullRequest and Issue structs
In
[events](https://developer.github.com/v3/activity/events/types/#pullrequestevent ),
the `id` field is present both in the Issue and PullRequest objects.
This PR adds them.
10 years ago
Glenn Lewis
2d3520b585
add unit tests for #342 - CreateImpersonation and DeleteImpersonation
Change-Id: Ib5fd4e99b88ff01e3363e049177326b7ee97be93
10 years ago
Hanno Hecker
07a1059646
add (AuthorizationsService) CreateImpersonation/DeleteImpersonation
Closes #342 .
10 years ago
Will Norris
92234e5677
add missing license headers in a few files
10 years ago
Gabe Rosenhouse
60ec3488bf
Adds MustParseRange
10 years ago
Glenn Lewis
525696f56f
add Yannick Utard as contributor
Change-Id: I8ba9587109cecf9ba5cb64efa20e58ecb1c7bfe0
10 years ago
Yannick Utard
8468db8b74
Add ReadOnly boolean field to deploy keys
Closes #391 .
Change-Id: Ie5bca9e80c5d1a1348f640a1a75063bac63f539a
10 years ago
Matthew Dempsky
8808be6605
Avoid unnecessary FooService allocations
Fixes #389
Fixes #390
10 years ago
Billy Lynch
087a452730
add support for OAuth Grant Authorizations API
GitHub API docs: https://developer.github.com/v3/oauth_authorizations
Fixes #348 .
Closes #388 .
Change-Id: I795b1c0e10bde10a1bc9aaa4594af4c91e07962d
10 years ago
Glenn Lewis
24a48bda0a
add Beshr Kayali as contributor
Change-Id: I6091efa31c267f2f71d519cb1f7901ad63500ec8
10 years ago
Beshr Kayali
e4b1c2870f
add support for list commits endpoint
Use Timestamp type for GistCommit CommitedAt field.
Add support for ListForks endpoint.
Add missing fields for GistCommit and GistFork types.
Closes #385 .
Change-Id: If1379d83173d52c974bb5834a834d97aee2f0ad8
10 years ago
Billy Lynch
45cbf2313c
Add support for affiliation and visibility in RepositoryListOptions.
Also updates comments in RepositoryListOptions to match the Github API docs
(https://developer.github.com/v3/repos/#list-your-repositories ).
Fixes #231
10 years ago
Dmitri Shuralyov
c31236d1f3
Remove issue locking/unlocking preview media type.
These changes are now official, so the custom media type is no longer
needed.
Fixes #381 .
Fixes #382 .
Updates #279 .
Change-Id: I33cad47c6645c5292f699826ae117b94260a3044
10 years ago
Glenn Lewis
bdd0f40310
better support both Events API and Webhook events in PushEventCommit
Fixes #370 .
Change-Id: I0a8567ae352bd2e9e973ac73383894d2b4cdfb9d
10 years ago
Glenn Lewis
07995e49c2
make integration tests pass even if already watching this repo
Note that `TestUsers_Keys` still fails for general users
but will need to be addressed later.
Fixes #366 .
Change-Id: I35d8a73c2daed08df7d60085b1585f48caee9a95
10 years ago
Glenn Lewis
5c1b3a05b4
add support for new repository invitations
Fixes #371 .
Change-Id: I97f2fc28ce048442ee8af3bd11c48b5b2084e09b
10 years ago
Glenn Lewis
4ea1b10b74
replace []Issue with []*Issue and for other large structs as well
Note that this is an API-breaking change but should have minimal
impact on users of this package due to the nice inference
properties of the Go programming language.
Bumped `libraryVersion` to `2` due to API-breaking change as
discussed in #376 .
Fixes #180 .
Change-Id: Ib386135e6b8f306d1f54278968c576f3ceccc4e7
10 years ago
Dmitri Shuralyov
1c08387e4c
Remove leading slash from ReactionsService.DeleteReaction URL.
It's harmless, but inconsistent. All other such URLs in this package do not use a leading slash.
See 09a37d57ac (commitcomment-17927607) .
10 years ago
Glenn Lewis
3e167707c0
remove unnecessary newlines
Change-Id: I7bf843b42a0d8869e72b6d0606bdc99893b10bdb
10 years ago
Glenn Lewis
b240c2dfee
add support for Issue Timeline API
Fixes #360 .
Change-Id: I69846ddeb5fd289ec81712cccaefde3f3931fd09
10 years ago
Glenn Lewis
e1bc3a7920
move examples to github_test package in examples_test.go
See #367 for discussion.
Change-Id: I10e26bddebeea2a1485fc4389caab1ff12421382
10 years ago
kujenga
e64c75d1c9
add tolerant parsing functionality for non-standard versions
10 years ago
Glenn Lewis
71e65bb773
document 'since' pagination for Users.ListAll
Fixes #278 .
Change-Id: Ia1d0c1f6b395d493714d91e0f6e79dc2506f8fde
10 years ago
Glenn Lewis
0237c55854
add support for multiple issue assignees
Fixes #362 .
Change-Id: I39d142b4ef54bf514140a56b5fcbbcfa784f0c7f
10 years ago
Glenn Lewis
a8b8751f9d
add utilities for processing payload messages
Fixes #361 .
Change-Id: I1c80b8eb7816efc9b83e6b8be956430c68809d5e
10 years ago
Hanno Hecker
d2e7389fc1
add Message field for "custom" errors
See https://developer.github.com/v3/#client-errors
Fixes #359 .
Change-Id: I9be617cb55e304f8f91675ce46f0726f548b742e
10 years ago
Glenn Lewis
a6edb1171a
add support for git signing API methods
Fixes #334 .
Change-Id: I9b10ae5e7679f5196778d9eb3ded6168d7facfc3
10 years ago
Glenn Lewis
790387d7d7
add Ainsley Chong as contributor
Change-Id: Ibc5ca9d03412dff2940b3b343b271392791efe18
10 years ago
Ainsley Chong
d4aea47787
Added integration tests for Repositories.List.
Fixes #335 .
Fixes #336 .
Change-Id: I56f1892fa763ffd6f413a5c9e2444ad9b775756c
10 years ago
Glenn Lewis
0af232a73d
add Garrett Squire as contributor
Change-Id: Id8ae964a0550f21166353e060cf62c1c921ad396
10 years ago
Garrett Squire
796cdb74b6
Add squashing capability to the pull request merge function.
Fixes #324 .
Fixes #353 .
Change-Id: If176b98b951db7f2e45ad7578bb8eeac13ffdbc2
10 years ago
Glenn Lewis
8e80839766
remove org permission content type
Additionally, change preview media type to documented custom media type
for https://developer.github.com/v3/orgs/teams/#check-if-a-team-manages-a-repository
Fixes #262 .
Change-Id: Ie9acf859346fce6b797b039d35b17e46f404e2a3
10 years ago
Bryan Boreham
c2beba44cf
Add missing ListOptions to various structs
Make it possible for callers of IssuesService.ListMilestones() and
similar to step through pages of results.
10 years ago
Dmitri Shuralyov
66d9f2f653
Update Reactions API (preview) for breaking change.
Reactions API now includes user information.
See https://developer.github.com/changes/2016-06-07-reactions-api-update/ .
Fixes #364 .
Updates #356 .
10 years ago
Will Norris
7ec4e45f77
add Joe Tsai as contributor
10 years ago
Joe Tsai
a69fa76cb5
fix unit tests for go1.7 release
An upcoming change to Go 1.7 allows the json package to be able to encode maps
with the integer keys. Thus, this is no longer a good way to generate intentional
JSON failures.
Reference:
f05c3aa24d
10 years ago
Glenn Lewis
09a37d57ac
add support for Reactions API
Fixes #356 .
Change-Id: Iecc8d7d7c11a8ce9ed38c6d024683815495cb8b4
10 years ago
Carl Jackson
64eb34159f
Document deprecation, stability
This has been a long time coming; apologies for taking so long!
Fixes #187 , #181 , #14
10 years ago
Will Norris
a68a8707f3
Add support for the Source Import API
Fixes #291
Fixes #351
10 years ago
Glenn Lewis
842c551fde
add more payloads to event.Payload
Closes #349
Change-Id: I733568c73e1bc2cd748c5c5cd3d16654c7dd7828
10 years ago
Dmitri Shuralyov
4c532303a6
Simplify Bool, Int, String helpers.
Code simplification suggestion by @gmlewis .
Closes #350
10 years ago
Dmitri Shuralyov
491489e7d7
Fix Int helper documentation.
This change makes it accurate and consistent with others.
10 years ago
Dmitri Shuralyov
13c2701463
Deprecate Client.Rate() method in favor of Response.Rate.
Client.Rate() method is unreliable in situations when API calls are made
by others that may hit different rate limit categories (core and search).
Each API call already returns a Response struct that contains an accurate
Rate, so that's a better mechanism to access this information.
See relevant discussion at https://github.com/google/go-github/pull/347#discussion_r61920849 .
10 years ago
Dmitri Shuralyov
b07f95ef93
Predict *RateLimitError, return immediately without network call.
When possible to do so reliably, i.e., the client knows that the rate
limit is exceeded and reset time is in the future, immediately return
*RateLimitError without making network calls to GitHub API.
Add a unit test covering RateLimits method populating client.rateLimits.
Remove commented out code.
Helps #152 and #153 .
10 years ago
Dmitri Shuralyov
bbe5f62e3f
Keep track of all rate limits in client.
In GitHub API, there are currently two categories of rate limits: core
and search. Previously, the client only tracked the rate limit from the
most recent API call. This change makes it track both rate limit
categories.
This will be useful in the following commit.
10 years ago
Dmitri Shuralyov
81ea1e5cb3
Fix formatting directive issues in tests.
As detected with go vet.
Simplify code slightly by removing unnecessary brackets around a
variable.
10 years ago
Dmitri Shuralyov
1d56631ea8
tests/integration: Turn into valid, empty Go package.
This describes the package in a way that can be seen via godoc,
and makes it so that the following command succeeds without
"no buildable Go source files" error:
go build github.com/google/go-github/...
10 years ago