Skip to content

[autosubmit] Get actual author association #101012

@KristinBi

Description

@KristinBi

We firstly used the rest API to get the reviews. However, the author association for reviewer is shown as CONTRIBUTOR even though the actual author association for this reviewer is MEMBER or OWNER.
Here is an example for this issue:
when I used the pr #100808 to test the current logic, both Casey and I were shown as CONTRIBUTOR even though we both are MEMBER.
Screen Shot 2022-04-13 at 2 56 20 PM

The cause for this issue is that some MEMBERS like me set his/her role as private (https://github.com/orgs/flutter/people?page=2), so when we use rest API to query for their author association, the real one will be hidden, and the CONTRIBUTOR will return. Considering this, we need to find a way to get the real author association.

We first thought that REST API may have some limitations, we then switched to GraphQL.
The issue we encountered here is that even we can get the real author association through direct query by using github explorer , we still cannot get correct author association by making queries through our codes.

As discussed in #101394, we thought this may be caused by some permission scope issue with the current token. We then opened an internal security bug to request the read access to admin:
Screen Shot 2022-04-13 at 3 19 27 PM

We finally fixed the issue by granting organization - member read only permission.

Metadata

Metadata

Assignees

No one assigned

    Labels

    team-infraOwned by Infrastructure team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions