Documentation ¶
Index ¶
- type Actor
- type GithubBranch
- type GithubConfig
- type GithubRepository
- type GithubWorkflowRunLogs
- type HttpClient
- type InitializeOptions
- type Repo
- func (r *Repo) CancelWorkflow(ctx context.Context, repository string, runId int64) error
- func (r *Repo) GetRepository(ctx context.Context, repository string) (*GithubRepository, error)
- func (r *Repo) GetTriggerableWorkflows(ctx context.Context, repository string) ([]Workflow, error)
- func (r *Repo) GetWorkflowRunLogs(ctx context.Context, repository string, runId int64) (GithubWorkflowRunLogs, error)
- func (r *Repo) GetWorkflows(ctx context.Context, repository string) ([]Workflow, error)
- func (r *Repo) InspectWorkflowContent(ctx context.Context, repository string, branch string, workflowFile string) ([]byte, error)
- func (r *Repo) ListBranches(ctx context.Context, repository string) ([]GithubBranch, error)
- func (r *Repo) ListRepositories(ctx context.Context, limit int) ([]GithubRepository, error)
- func (r *Repo) ListWorkflowRuns(ctx context.Context, repository string, branch string) (*WorkflowRuns, error)
- func (r *Repo) ReRunFailedJobs(ctx context.Context, repository string, runId int64) error
- func (r *Repo) ReRunWorkflow(ctx context.Context, repository string, runId int64) error
- func (r *Repo) TestConnection(ctx context.Context) error
- func (r *Repo) TriggerWorkflow(ctx context.Context, repository string, branch string, workflowName string, ...) error
- type Repository
- type Workflow
- type WorkflowRun
- type WorkflowRuns
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GithubBranch ¶
type GithubBranch struct {
Name string `json:"name"`
}
type GithubConfig ¶
type GithubConfig struct {
Token string
}
type GithubRepository ¶
type GithubRepository struct { Id int `json:"id"` NodeId string `json:"node_id"` Name string `json:"name"` FullName string `json:"full_name"` Private bool `json:"private"` Description string `json:"description"` Language interface{} `json:"language"` ForksCount int `json:"forks_count"` StargazersCount int `json:"stargazers_count"` WatchersCount int `json:"watchers_count"` Size int `json:"size"` DefaultBranch string `json:"default_branch"` OpenIssuesCount int `json:"open_issues_count"` IsTemplate bool `json:"is_template"` Topics []string `json:"topics"` HasIssues bool `json:"has_issues"` HasProjects bool `json:"has_projects"` HasWiki bool `json:"has_wiki"` HasPages bool `json:"has_pages"` HasDownloads bool `json:"has_downloads"` Archived bool `json:"archived"` Disabled bool `json:"disabled"` Visibility string `json:"visibility"` PushedAt time.Time `json:"pushed_at"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Permissions struct { Admin bool `json:"admin"` Push bool `json:"push"` Pull bool `json:"pull"` } `json:"permissions"` AllowRebaseMerge bool `json:"allow_rebase_merge"` TemplateRepository interface{} `json:"template_repository"` TempCloneToken string `json:"temp_clone_token"` AllowSquashMerge bool `json:"allow_squash_merge"` AllowAutoMerge bool `json:"allow_auto_merge"` DeleteBranchOnMerge bool `json:"delete_branch_on_merge"` AllowMergeCommit bool `json:"allow_merge_commit"` SubscribersCount int `json:"subscribers_count"` NetworkCount int `json:"network_count"` License struct { Key string `json:"key"` Name string `json:"name"` Url string `json:"url"` SpdxId string `json:"spdx_id"` NodeId string `json:"node_id"` HtmlUrl string `json:"html_url"` } `json:"license"` Forks int `json:"forks"` OpenIssues int `json:"open_issues"` Watchers int `json:"watchers"` }
type GithubWorkflowRunLogs ¶
type InitializeOptions ¶
type Repo ¶
type Repo struct { Client HttpClient // contains filtered or unexported fields }
func (*Repo) CancelWorkflow ¶
func (*Repo) GetRepository ¶
func (*Repo) GetTriggerableWorkflows ¶
func (*Repo) GetWorkflowRunLogs ¶
func (*Repo) GetWorkflows ¶
func (*Repo) InspectWorkflowContent ¶
func (*Repo) ListBranches ¶
func (*Repo) ListRepositories ¶
func (*Repo) ListWorkflowRuns ¶
func (*Repo) ReRunFailedJobs ¶
func (*Repo) ReRunWorkflow ¶
type Repository ¶
type Repository interface { TestConnection(ctx context.Context) error ListRepositories(ctx context.Context, limit int) ([]GithubRepository, error) GetRepository(ctx context.Context, repository string) (*GithubRepository, error) ListBranches(ctx context.Context, repository string) ([]GithubBranch, error) ListWorkflowRuns(ctx context.Context, repository string, branch string) (*WorkflowRuns, error) TriggerWorkflow(ctx context.Context, repository string, branch string, workflowName string, workflow any) error GetWorkflows(ctx context.Context, repository string) ([]Workflow, error) GetTriggerableWorkflows(ctx context.Context, repository string) ([]Workflow, error) InspectWorkflowContent(ctx context.Context, repository string, branch string, workflowFile string) ([]byte, error) GetWorkflowRunLogs(ctx context.Context, repository string, runId int64) (GithubWorkflowRunLogs, error) ReRunFailedJobs(ctx context.Context, repository string, runId int64) error ReRunWorkflow(ctx context.Context, repository string, runId int64) error CancelWorkflow(ctx context.Context, repository string, runId int64) error }
type WorkflowRun ¶
type WorkflowRun struct { ID int64 `json:"id"` WorkflowID int64 `json:"workflow_id"` Name string `json:"name"` DisplayTitle string `json:"display_title"` Actor Actor `json:"actor"` TriggeringActor Actor `json:"triggering_actor"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Conclusion string `json:"conclusion"` HeadBranch string `json:"head_branch"` RunAttempt int `json:"run_attempt"` CheckSuiteURL string `json:"check_suite_url"` CancelURL string `json:"cancel_url"` RerunURL string `json:"rerun_url"` Path string `json:"path"` Event string `json:"event"` HTMLURL string `json:"html_url"` LogsURL string `json:"logs_url"` JobsURL string `json:"jobs_url"` ArtifactsURL string `json:"artifacts_url"` }
type WorkflowRuns ¶
type WorkflowRuns struct { TotalCount int64 `json:"total_count"` WorkflowRuns []WorkflowRun `json:"workflow_runs"` }
Click to show internal directories.
Click to hide internal directories.