MCPcopy
hub / github.com/gitcoinco/web / get_issue_timeline_events

Function get_issue_timeline_events

app/git/utils.py:494–519  ·  view source on GitHub ↗

Get the timeline events for a given issue. PLEASE NOTE CURRENT LIMITATION OF 100 EVENTS. PLEASE NOTE GITHUB API FOR THIS IS SUBJECT TO CHANGE. (See https://developer.github.com/changes/2016-05-23-timeline-preview-api/ for more info.) Args: owner (str): Owner of the repo

(owner, repo, issue, page=1)

Source from the content-addressed store, hash-verified

492
493
494def get_issue_timeline_events(owner, repo, issue, page=1):
495 """Get the timeline events for a given issue.
496
497 PLEASE NOTE CURRENT LIMITATION OF 100 EVENTS.
498 PLEASE NOTE GITHUB API FOR THIS IS SUBJECT TO CHANGE.
499 (See https://developer.github.com/changes/2016-05-23-timeline-preview-api/ for more info.)
500
501 Args:
502 owner (str): Owner of the repo
503 repo (str): Name of the repo
504 issue (int): Issue number
505
506 Returns:
507 requests.Response: The GitHub timeline response.
508 """
509 params = {'sort': 'created', 'direction': 'desc', 'per_page': 100, 'page': page, }
510 url = f'https://api.github.com/repos/{owner}/{repo}/issues/{issue}/timeline'
511 try:
512 # Set special header to access timeline preview api
513 response = requests.get(url, auth=_AUTH, headers=TIMELINE_HEADERS, params=params)
514 return response.json()
515 except Exception as e:
516 logger.error(
517 "could not get timeline events - Reason: %s - %s %s %s %s", e, owner, repo, issue, response.status_code
518 )
519 return {}
520
521
522def get_interested_actions(github_url, username, email=''):

Callers 2

get_interested_actionsFunction · 0.85

Calls

no outgoing calls

Tested by 1