thoth-station/srcops-testing

project board test issue #5

Opened this issue · 2 comments

project board test issue #5

Desc

Attached projects 2 and 3 by using this Issue interface, attached project 1 by using project interface

Token

Using usual github token with project access enabled

project Full control of projects
read:project Read access of projects

Header setup

Using custom header with PyGithub module

def get_project_details_timeline(issue):
        return github.PaginatedList.PaginatedList(
            github.TimelineEvent.TimelineEvent,
            issue._requester,
            f"{issue.url}/timeline",
            None,
            headers={
                "Accept": "application/vnd.github.starfox-preview+json,application/vnd.github.mockingbird-preview"
            },
        )

Result

>>> import github
>>> from github import Github
>>> GITHUB_ACCESS_TOKEN=<token>
>>> gh = Github(login_or_token=GITHUB_ACCESS_TOKEN)
>>> mi = gh.get_repo("thoth-station/srcops-testing")
>>> def get_project_details_timeline(issue):
...         return github.PaginatedList.PaginatedList(
...             github.TimelineEvent.TimelineEvent,
...             issue._requester,
...             f"{issue.url}/timeline",
...             None,
...             headers={
...                 "Accept": "application/vnd.github.starfox-preview+json,application/vnd.github.mockingbird-preview"
...             },
...         )
... 
>>> issue = mi.get_issue(271)
>>> timeline = get_project_details_timeline(issue)
>>> timeline.totalCount
1
>>> timeline[0].event 
'commented'

Which means no success, as the timeline entity does not contain other events (the project related stuff)