Go-github: Inconsistency in documentation for ProjectCardOptions.ContentType field.

Created on 15 Aug 2017  路  5Comments  路  Source: google/go-github

https://github.com/google/go-github/blob/cf4400336af2282a4879072b0d1c17b7d8c0207e/github/projects.go#L326-L337

The documentation for ContentType field says:

Possible values are: "Issue", "PullRequest".

I noticed at https://developer.github.com/v3/projects/cards/, it says:

Can only be "Issue" at this time.

This is an inconsistency, which can be investigated and resolved.

I've checked, and our documentation is from 11 months ago when projects support was initially added in #438 (/cc @gmlewis who created it, FYI).

I suspect it's likely that GitHub has changed things on their end since 11 months ago, hence our side being slightly out of date and inconsistent. This appears to be limited to documentation at first glance, but further investigation can confirm that.

good first issue

All 5 comments

@shurcooL can I take up this issue.

Thanks!

Feel free to investigate it and post your findings here. If it's pretty straightforward, you could send a PR right away. Otherwise, it's a good idea to discuss it first. See CONTRIBUTING.md for more info.

ProjectCardOptions is used in the following functions

  1. CreateProjectCard
  2. UpdateProjectCard

In these two functions,ProjectCardOptions is used as an argument.Therefore I believe the inconsistency is centered around the documentation only and can be eliminated by editing the corresponding docs.
If my findings are satisfactory I will be happy to send a PR.

That sounds very reasonable to me. Thanks for investigating!

I'll just ping @gmlewis on this, since he wrote the original code. If he doesn't have any objections either, then we're good to go.

Feel free to send the PR since I expect it should be pretty small.

That sounds great, @shurcooL and @scriptonist... thank you for finding and fixing this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

propertone picture propertone  路  3Comments

xcoulon picture xcoulon  路  3Comments

adrienzieba picture adrienzieba  路  3Comments

gmlewis picture gmlewis  路  3Comments

scriptonist picture scriptonist  路  3Comments