Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultExternalURL = "http://localhost:3000"
View Source
const HookScript = "bass/github-hook"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Log *logs.Logger DB *models.Conn Blobs *blobs.Bucket Config *cfg.Config Transport *ghapp.Transport // contains filtered or unexported fields }
func (*Controller) Create ¶
func (c *Controller) Create(w http.ResponseWriter, r *http.Request)
type GitHubEventPayload ¶
type GitHubEventPayload struct { // set on many events Action *string `json:"action,omitempty"` // set on push events After *string `json:"after,omitempty"` // set on check_suite events CheckSuite *github.CheckSuite `json:"check_suite,omitempty"` // set on check_run events CheckRun *github.CheckRun `json:"check_run,omitempty"` // set on pull_request events PullRequest *github.PullRequest `json:"pull_request,omitempty"` // set on all events Repo *github.Repository `json:"repository,omitempty"` Sender *github.User `json:"sender,omitempty"` Installation *github.Installation `json:"installation,omitempty"` }
func (GitHubEventPayload) Meta ¶
func (event GitHubEventPayload) Meta() models.Meta
func (*GitHubEventPayload) RefToLoad ¶
func (event *GitHubEventPayload) RefToLoad(ctx context.Context, ghClient *github.Client) (string, error)
RefToLoad determines the ref to use for dispatching the event.
For check_suite events, this is the check_suite.head_sha.
For check_run events, this is the check_run.head_sha.
For pull_request events, this is the pull_request.head.sha.
For every other event, this is the repo's default branch's current sha.
func (*GitHubEventPayload) SHA ¶
func (event *GitHubEventPayload) SHA() string
Click to show internal directories.
Click to hide internal directories.