def accept_invitations()

in webhook-app/invitations.py [0:0]


def accept_invitations():
    gh = github_helper.get_client()

    invitations = gh.session.get(
        'https://api.github.com/user/repository_invitations').json()

    for invitation in invitations:
        gh.session.patch(invitation['url'])
        logging.info('Accepted invite to {}'.format(
            invitation['repository']['full_name']))