Documentation ¶
Overview ¶
Package github provides a github client with functions tailored to the PSL's needs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct { // Owner is the github account of the repository to query. If // empty, defaults to "publicsuffix". Owner string // Repo is the repository to query. If empty, defaults to "list". Repo string // contains filtered or unexported fields }
Client is a GitHub API client that performs PSL-specific operations. The zero value is a client that interacts with the official publicsuffix/list repository.
func (*Repo) PSLForHash ¶
PSLForHash returns the PSL file at the given git commit hash.
func (*Repo) PSLForPullRequest ¶
func (c *Repo) PSLForPullRequest(ctx context.Context, prNum int) (withoutPR, withPR []byte, err error)
PSLForPullRequest fetches the PSL files needed to validate the given pull request. Returns the PSL file for the target branch, and the same but with the PR's changes applied.
Click to show internal directories.
Click to hide internal directories.