BREAKING CHANGE: `AddProjectItemOptions` and `UpdateProjectItemOptions` are renamed to `AddProjectItemRequest` and `UpdateProjectItemRequest` and passed by value; `AddProjectItemRequest.Type` is no longer a pointer; `UpdateProjectItemOptions.Archived` is removed.
BREAKING CHANGE: All support for "Project (classic)" is removed and `Project` responses are replaced by `ProjectV2` (renamed from `ProjectsV2`).
Fixes: #3367.
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.
Go style suggests that acronyms, including "ID", should have a consistent case.
> This rule also applies to "ID" when it is short for "identifier," so write
> "appID" instead of "appId".
Source: https://github.com/golang/go/wiki/CodeReviewComments#initialisms
This change fixes the following lint issues:
github/projects.go:119:46: method parameter projectId should be projectID
github/projects.go:176:47: method parameter projectId should be projectID
Updates #467.
Closes#498.
Change-Id: I53c5bd5ac59cad1b4ae955c8384ff7b25a20b278
Created new service ProjectsService and removed methods in repos_projects that belong to ProjectsService.
Minor tweaks by @gmlewis following review.
Fixes#461.
Closes#467.
Change-Id: I8b85ff6e716151b505c843c905534bd5fe8257ae