Documentation
¶
Overview ¶
Package githubapp provides order template creation helpers.
Package githubapp provides gitshop.yaml creation and management.
Index ¶
- Constants
- func ReadWebhookPayload(r *http.Request, secret string) ([]byte, error)
- func ValidateWebhookSignature(payload []byte, signature, secret string) error
- type Auth
- type Client
- func (c *Client) AddLabels(ctx context.Context, repoFullName string, issueNumber int, labels []string) error
- func (c *Client) AssignIssue(ctx context.Context, repoFullName string, issueNumber int, assignees []string) error
- func (c *Client) CheckPermission(ctx context.Context, repoFullName, username string) (bool, error)
- func (c *Client) CloseIssue(ctx context.Context, repoFullName string, issueNumber int) error
- func (c *Client) CreateComment(ctx context.Context, repoFullName string, issueNumber int, body string) error
- func (c *Client) CreateIssue(ctx context.Context, repoFullName string, title, body string, labels []string, ...) error
- func (c *Client) CreateOrUpdateFile(ctx context.Context, repoFullName, path, content, message string) error
- func (c *Client) CreateOrUpdateFileWithPR(ctx context.Context, ...) (*FileCreationResult, error)
- func (c *Client) CreateOrUpdateOrderTemplate(ctx context.Context, owner, repo, templateContent string) (*FileCreationResult, error)
- func (c *Client) DeleteComment(ctx context.Context, repoFullName string, commentID int64) error
- func (c *Client) EnsureGitShopYAML(ctx context.Context, client *github.Client, owner, repo, shopName string) (*YAMLCreationResult, error)
- func (c *Client) EnsureGitShopYAMLForRepo(ctx context.Context, owner, repo, shopName string) (*YAMLCreationResult, error)
- func (c *Client) EnsureLabels(ctx context.Context, repoFullName string, labels []LabelDefinition) error
- func (c *Client) EnsureOrderTemplate(ctx context.Context, owner, repo, templateContent string) (*FileCreationResult, error)
- func (c *Client) GetFile(ctx context.Context, repoFullName, path, ref string) ([]byte, error)
- func (c *Client) GetFileStatus(ctx context.Context, repoFullName, path string) (*FileStatus, error)
- func (c *Client) GetInstallation(ctx context.Context, userAccessToken string, installationID int64) (*Installation, error)
- func (c *Client) ListComments(ctx context.Context, repoFullName string, issueNumber int) ([]*github.IssueComment, error)
- func (c *Client) ListDirectory(ctx context.Context, repoFullName, path string) ([]RepoFile, error)
- func (c *Client) ListLabels(ctx context.Context, repoFullName string) (map[string]github.Label, error)
- func (c *Client) RemoveLabel(ctx context.Context, repoFullName string, issueNumber int, label string) error
- func (c *Client) UpdateIssueTitle(ctx context.Context, repoFullName string, issueNumber int, title string) error
- func (c *Client) WithInstallation(installationID int64) *Client
- type FileCreationResult
- type FileStatus
- type Installation
- type LabelDefinition
- type RepoFile
- type YAMLCreationResult
Constants ¶
View Source
const DefaultGitShopYAML = `` /* 584-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AssignIssue ¶
func (*Client) CheckPermission ¶
func (*Client) CloseIssue ¶
func (*Client) CreateComment ¶
func (*Client) CreateIssue ¶
func (*Client) CreateOrUpdateFile ¶
func (*Client) CreateOrUpdateFileWithPR ¶
func (*Client) CreateOrUpdateOrderTemplate ¶
func (*Client) DeleteComment ¶
func (*Client) EnsureGitShopYAML ¶
func (c *Client) EnsureGitShopYAML(ctx context.Context, client *github.Client, owner, repo, shopName string) (*YAMLCreationResult, error)
EnsureGitShopYAML checks if gitshop.yaml exists in the repo and creates it if not. It attempts to commit directly first, and falls back to creating a PR if the branch is protected.
func (*Client) EnsureGitShopYAMLForRepo ¶
func (*Client) EnsureLabels ¶
func (*Client) EnsureOrderTemplate ¶
func (*Client) GetFileStatus ¶
func (*Client) GetInstallation ¶
func (*Client) ListComments ¶
func (*Client) ListDirectory ¶
func (*Client) ListLabels ¶
func (*Client) RemoveLabel ¶
func (*Client) UpdateIssueTitle ¶
func (*Client) WithInstallation ¶
type FileCreationResult ¶
type Installation ¶
type LabelDefinition ¶
Click to show internal directories.
Click to hide internal directories.