Returns
A plaintext report containing the number of PRs
and each PR’s title and number.
Return type
str
list_pull_request_files(pr_number: int) → List[Dict[str, Any]][source]¶
Fetches the full text of all files in a PR. Truncates after first 3k tokens.
# TODO: Enhancement to summarize files with ctags if they’re getting long.
Parameters
pr_number (int) – The number of the pull request on Github
Returns
A dictionary containing the issue’s title,
body, and comments as a string
Return type
dict
classmethod parse_file(path: Union[str, Path], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
parse_issues(issues: List[Issue]) → List[dict][source]¶
Extracts title and number from each Issue and puts them in a dictionary
:param issues: A list of Github Issue objects
:type issues: List[Issue]
Returns
A dictionary of issue titles and numbers
Return type
List[dict]
classmethod parse_obj(obj: Any) → Model¶
parse_pull_requests(pull_requests: List[PullRequest]) → List[dict][source]¶
Extracts title and number from each Issue and puts them in a dictionary
:param issues: A list of Github Issue objects
:type issues: List[Issue]
Returns
A dictionary of issue titles and numbers
Return type
List[dict]
classmethod parse_raw(b: Union[str, bytes], *, content_type: unicode = None, encoding: unicode = 'utf8', proto: Protocol = None, allow_pickle: bool = False) → Model¶
read_file(file_path: str) → str[source]¶
Read a file from this agent’s branch, defined by self.active_branch,