Repository navigation
Add AuthorAssociation field in struct PullRequest - #802
Conversation
|
You'll need to run |
|
It's unfortunate that the field isn't documented. But it's easy to confirm it's there, e.g., https://api.github.com/repos/google/go-github/pulls/802: LGTM, just need to update the generated file. |
FWIW, this field is documented as part of GitHub's v4 API: |
Signed-off-by: Allen Sun <shlallen1990@gmail.com>
|
Thanks for your detailed guide. I have updated the generating thing . PTAL @shurcooL |
|
If you want, it'd be helpful to contact GitHub support and let them know this field is missing in the docs at https://developer.github.com/v3/pulls/, so it can be added there (and gain more confidence in being able to rely on it). Caution should be taken using it given it is not documented (but I suspect it's likely because they haven't gotten around to updating the v3 docs yet). |
The field contains the author association with the repository, e.g., "COLLABORATOR", "CONTRIBUTOR", "NONE", etc. It's not currently documented at https://developer.github.com/v3/pulls/ but is present in GitHub API v3 responses. It's documented in GitHub API v4 at https://developer.github.com/v4/reference/object/pullrequest/#fields and https://developer.github.com/v4/reference/enum/commentauthorassociation/.
The field contains the author association with the repository, e.g., "COLLABORATOR", "CONTRIBUTOR", "NONE", etc. It's not currently documented at https://developer.github.com/v3/pulls/ but is present in GitHub API v3 responses. It's documented in GitHub API v4 at https://developer.github.com/v4/reference/object/pullrequest/#fields and https://developer.github.com/v4/reference/enum/commentauthorassociation/.

I see that when a user contributes to a repo at his first time, the github will show this contributor is the-first-time-contributor. And I contact with developers in github about how to get this field in API.
And they said they design a new Field
AuthorAssociationin pullrequest struct. Although this is not documented in github API docs.I think it is important, so I try to add this field.