Documentation
¶
Overview ¶
Package github implements the codefly toolbox contract for GitHub — pure Go via the google/go-github SDK (no `gh` binary, matching the toolbox convention that git/docker/web are all SDK clients, not CLI shell-outs).
owner/repo are derived from the workspace's `origin` remote (go-git), and can be overridden per call. Auth is a GitHub token (GITHUB_TOKEN), added via a transport — no oauth2 dependency.
gortk does the compaction: PR/issue lists are normalized to a small JSON array and flattened to one line each by a gortk `json` Spec; a PR body is run through the gortk "gh" line filter to strip badge rows, images, and HTML comments.
Index ¶
- type Server
- func (s *Server) MergePullRequest(ctx context.Context, req *gatewayv1.ForgeMergePullRequestRequest) (*gatewayv1.ForgeMergePullRequestResponse, error)
- func (s *Server) NormalizeWebhook(req *gatewayv1.ForgeNormalizeWebhookRequest) (*gatewayv1.ForgeEvent, error)
- func (s *Server) PullRequestStatus(ctx context.Context, repository *gatewayv1.ForgeRepository, number int64) (*gatewayv1.ForgePullRequestStatus, error)
- func (s *Server) RequestReview(ctx context.Context, req *gatewayv1.ForgeRequestReviewRequest) (*gatewayv1.ForgeRequestReviewResponse, error)
- func (s *Server) Tools() []*registry.ToolDefinition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server implements the Toolbox contract for GitHub.
func New ¶
New returns a Server using the given GitHub token, scoped to a workspace whose origin remote names the default owner/repo.
func (*Server) MergePullRequest ¶ added in v0.2.37
func (s *Server) MergePullRequest(ctx context.Context, req *gatewayv1.ForgeMergePullRequestRequest) (*gatewayv1.ForgeMergePullRequestResponse, error)
MergePullRequest enforces the requested check policy and returns the merge result stamped from GitHub's API response.
func (*Server) NormalizeWebhook ¶ added in v0.2.37
func (s *Server) NormalizeWebhook(req *gatewayv1.ForgeNormalizeWebhookRequest) (*gatewayv1.ForgeEvent, error)
NormalizeWebhook verifies GitHub's signature and converts provider payloads into the forge contract used by every caller.
func (*Server) PullRequestStatus ¶ added in v0.2.37
func (s *Server) PullRequestStatus(ctx context.Context, repository *gatewayv1.ForgeRepository, number int64) (*gatewayv1.ForgePullRequestStatus, error)
PullRequestStatus returns the provider-authoritative status, checks, reviews, and blocking reason for one pull request.
func (*Server) RequestReview ¶ added in v0.2.37
func (s *Server) RequestReview(ctx context.Context, req *gatewayv1.ForgeRequestReviewRequest) (*gatewayv1.ForgeRequestReviewResponse, error)
RequestReview requests users and teams and returns the provider-accepted set.
func (*Server) Tools ¶
func (s *Server) Tools() []*registry.ToolDefinition
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
github-toolbox
command
Command github-toolbox is the standalone binary form of the codefly github toolbox.
|
Command github-toolbox is the standalone binary form of the codefly github toolbox. |