leonbusy / Hanliang_Project

0 stars 0 forks source link

Write code for using PyGithub to Get Initial Data Set #6

Open twsswt opened 2 years ago

twsswt commented 2 years ago

Code will be something like:

github_instance = GitHub('secret_token')

repositories = ['bitcoin', 'airbnb'] # ...

for repository_name in repositories:
    repo = github_instance.get(repository_name)
    pull_requests = repo.get_pulls(state='closed')
    for pull_request in pull_requests:
        comments = pull_request.comments
        for comment in comments:
              print(comment.text, comment.date, repository.url, repository.name, pr.number, comment.id)
              # export to excel instead?

DoD is spreadsheet of comment text with columns to allow grouping of comments by project, PR, commenter, PR author etc.