Search Results

These classes are meant to expose the entirety of an item returned as a searchresult by GitHub’s Search API.

classgithub3.search.CodeSearchResult(json,session:GitHubSession)

A representation of a code search result from the API.

This object has the following attributes:

git_url

The URL to retrieve the blob via Git

html_url

The URL to view the blob found in a browser.

name

The name of the file where the search result was found.

path

The path in the repository to the file containing the result.

repository

AShortRepository representing therepository in which the result was found.

score

The confidence score assigned to the result.

sha

The SHA1 of the blob in which the code can be found.

text_matches

A list of the text matches in the blob that generated this result.

Note

To receive these, you must passtext_match=True tosearch_code().

classgithub3.search.IssueSearchResult(json,session:GitHubSession)

A representation of a search result containing an issue.

This object has the following attributes:

issue

AShortIssue representing the issuefound in this search result.

score

The confidence score of this search result.

text_matches

A list of matches in the issue for this search result.

Note

To receive these, you must passtext_match=True tosearch_issues().

classgithub3.search.RepositorySearchResult(json,session:GitHubSession)

A representation of a search result containing a repository.

This object has the following attributes:

..attribute::repository

AShortRepository representing therepository found by the search.

score

The confidence score of this search result.

text_matches

A list of the text matches in the repository that generated thisresult.

Note

To receive these, you must passtext_match=True tosearch_code().

classgithub3.search.UserSearchResult(json,session:GitHubSession)

Representation of a search result for a user.

This object has the following attributes:

score

The confidence score of this result.

text_matches

If present, a list of text strings that match the search string.

user

AShortUser representing the user foundin this search result.