Documentation
¶
Index ¶
- type GitHubForge
- func (g *GitHubForge) AvailableAfter() time.Time
- func (g *GitHubForge) CanHandle(link string) bool
- func (g *GitHubForge) CloneCredentials(ctx context.Context, repo string) (*forge.Credentials, error)
- func (g *GitHubForge) CreatePullRequest(ctx context.Context, repo, baseBranch, headBranch, title, body string) (string, error)
- func (g *GitHubForge) FindOpenPullRequest(ctx context.Context, repo, headBranch string) (string, error)
- func (g *GitHubForge) GetCIEnv(run forge.ForgeRun) map[string]string
- func (g *GitHubForge) GetDefaultBranch(ctx context.Context, repo string) (string, error)
- func (g *GitHubForge) GetRun(ctx context.Context, link string) (forge.ForgeRun, error)
- func (g *GitHubForge) GetVariables(ctx context.Context, repo string) (map[string]string, error)
- func (g *GitHubForge) ProcessWebhook(r *http.Request) (string, error)
- func (g *GitHubForge) UpdateStatus(ctx context.Context, repo, sha string, status forge.Status) error
- func (g *GitHubForge) UploadReleaseAsset(ctx context.Context, repo, tag, name string, data io.Reader) error
- type Run
- func (r *Run) Author() string
- func (r *Run) Branch() string
- func (r *Run) CIEnv() map[string]string
- func (r *Run) CloneURL() string
- func (r *Run) CommitMessage() string
- func (r *Run) Link() string
- func (r *Run) Ref() string
- func (r *Run) Repo() string
- func (r *Run) SHA() string
- func (r *Run) Type() forge.EventType
- func (r *Run) UpdateStatus(ctx context.Context, status forge.Status) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubForge ¶
type GitHubForge struct {
// contains filtered or unexported fields
}
func NewGitHubForge ¶
func NewGitHubForge(appID int64, privateKey []byte, webhookSecret string) *GitHubForge
func (*GitHubForge) AvailableAfter ¶
func (g *GitHubForge) AvailableAfter() time.Time
AvailableAfter returns the time when the forge is available for requests.
func (*GitHubForge) CanHandle ¶
func (g *GitHubForge) CanHandle(link string) bool
CanHandle checks if this forge can handle GitHub URLs
func (*GitHubForge) CloneCredentials ¶
func (g *GitHubForge) CloneCredentials(ctx context.Context, repo string) (*forge.Credentials, error)
func (*GitHubForge) CreatePullRequest ¶
func (*GitHubForge) FindOpenPullRequest ¶
func (*GitHubForge) GetDefaultBranch ¶
func (*GitHubForge) GetVariables ¶
func (*GitHubForge) ProcessWebhook ¶
func (g *GitHubForge) ProcessWebhook(r *http.Request) (string, error)
ProcessWebhook parses the webhook to extract the canonical link
func (*GitHubForge) UpdateStatus ¶
func (*GitHubForge) UploadReleaseAsset ¶
type Run ¶
type Run struct {
// contains filtered or unexported fields
}
func (*Run) CommitMessage ¶
Click to show internal directories.
Click to hide internal directories.