New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds state to project options per github's docs #746

Merged
merged 3 commits into from Oct 13, 2017

Conversation

Projects
None yet
4 participants
@seemethere
Contributor

seemethere commented Oct 5, 2017

State was missing, useful for updating projects per:
https://developer.github.com/v3/projects/#update-a-project

Adds the ability to open/close projects based on ProjectOptions with ProjectUpdate

Adds state to project options per github's docs
State was missing, useful for updating projects per:
https://developer.github.com/v3/projects/#update-a-project

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>

@googlebot googlebot added the cla: yes label Oct 5, 2017

Add option to test as well
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
@dmitshur

LGTM. Thanks!

@dmitshur dmitshur requested a review from gmlewis Oct 6, 2017

@gmlewis

gmlewis approved these changes Oct 6, 2017

LGTM. I'll let @shurcooL merge after he has read my comments in case he agrees that the nits should be addressed.
Thank you, @seemethere and @shurcooL!

Show outdated Hide outdated github/projects.go
Add more documentation for State field
The State field is only valid for project updates, where it is also
optional.

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
@seemethere

This comment has been minimized.

Show comment
Hide comment
@seemethere

seemethere Oct 12, 2017

Contributor

Any updates on this?

Contributor

seemethere commented Oct 12, 2017

Any updates on this?

@dmitshur dmitshur merged commit 0f6d3ce into google:master Oct 13, 2017

2 checks passed

cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dmitshur

This comment has been minimized.

Show comment
Hide comment
@dmitshur

dmitshur Oct 13, 2017

Member

Merged. Thanks @seemethere!

Member

dmitshur commented Oct 13, 2017

Merged. Thanks @seemethere!

nbareil pushed a commit to nbareil/go-github that referenced this pull request May 1, 2018

Add ProjectOptions.State field. (#746)
State is an optional parameter when updating projects. It gives
the ability to open/close projects via UpdateProject method.

GitHub API docs: https://developer.github.com/v3/projects/#update-a-project
// They should be left with zero values for creation.
// State of the project. Either "open" or "closed". (Optional.)
State string `json:"state,omitempty"`

This comment has been minimized.

@gmlewis

gmlewis Aug 10, 2018

Collaborator

Looking now at #969, I'm thinking this optional field should be changed to State *string ... so that it is not passed if it is not provided. (In other words, to let omitempty do its thing.)
If there are no objections, I'll comment about this in #969.

@gmlewis

gmlewis Aug 10, 2018

Collaborator

Looking now at #969, I'm thinking this optional field should be changed to State *string ... so that it is not passed if it is not provided. (In other words, to let omitempty do its thing.)
If there are no objections, I'll comment about this in #969.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment