BREAKING CHANGE: `LockIssueOptions`, `PullRequestBranchUpdateOptions`, and `UserSuspendOptions` are renamed to `LockIssueRequest`, `UpdatePullRequestBranchRequest`, and `SuspendUserRequest` and are passed by value to `IssuesService.Lock`, `PullRequestsService.UpdateBranch`, and `UsersService.Suspend`; `LockIssueRequest.LockReason` is now `*string`.
BREAKING CHANGE: `IssuesService.CreateLabel` now takes `CreateLabelRequest` by value (with required non-pointer `Name`); `IssuesService.EditLabel` renamed to `UpdateLabel`, taking an `UpdateLabelRequest` by value.
BREAKING CHANGE: Split `IssuesService.List` into `IssuesService.ListAllIssues` and `IssuesService.ListUserIssues`. `IssuesService.ListByOrg` now accepts `IssueListByOrgOptions`. `SubIssueService.ListByIssue` now accepts `ListOptions`.
This refactor removes the global test variables used by all tests,
replacing them with local variables that are independent in each test.
This is better style, easier to read and be confident about correctness,
and allows tests to be parallelized in the future.
Resolves#762.
Add a helper method for checking whether a github.Issue represents
an issue or PR by using the approach documented in GitHub API docs at
https://developer.github.com/v3/issues/#list-issues, which is to check
whether PullRequestLinks is nil or not.
Using this method is optional, and previous code that manually checks
whether PullRequestLinks is nil continues to be valid. The helper may
be used for convenience or to improve readability of user code.
Fix minor spelling issues in comments.
This is a large breaking API change. It is unavoidable and necessary
to resolve#526. This breaking change is part of bump to libraryVersion 3.
It adds ctx context.Context as first parameter to all endpoint methods,
including Do.
Updating for this API change should be easy and the compiler will help
catch instances that need to be updated. For example:
main.go:193: not enough arguments in call to gh.Activity.MarkRepositoryNotificationsRead
have (string, string, time.Time)
want (context.Context, string, string, time.Time)
...
You should pass the available context as first parameter. If your code
does not have context.Context available and you want to maintain previous
normal behavior, use context.Background(). Don't pass nil context; use
context.TODO() instead if you wish to delay figuring out the best context
to use. Then you can address the TODO at a later time.
Refer to documentation of package context at https://godoc.org/context
for more information.
This commit also changes ./tests/fields to use context.Background()
instead of deprecated oauth2.NoContext.
Resolves#526.
These changes are now official, so the custom media type is no longer
needed.
Fixes#381.
Fixes#382.
Updates #279.
Change-Id: I33cad47c6645c5292f699826ae117b94260a3044
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
Using an *Issue in IssuesService.{Create,Edit} means that the Labels
and Assignee fields do not serialize to the correct JSON representation
for the GitHub API. This change introduces an IssueRequest struct to
use instead, allowing labels and assignees to be set on create or edit.