hooks

package
v0.0.0-...-53030a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duplicates

type Duplicates struct {
	// contains filtered or unexported fields
}

Duplicates is a map of active/duplicate commit IDs.

func NewDuplicateMap

func NewDuplicateMap() *Duplicates

NewDuplicateMap creates a new DuplicateMap.

func (*Duplicates) Duplicate

func (dm *Duplicates) Duplicate(commitID string) bool

Duplicate returns true if the commitID is a duplicate.

func (*Duplicates) Remove

func (dm *Duplicates) Remove(commitID string)

Remove removes the commitID from the duplicate map to avoid ever growing map. Should be called after the push event has been processed.

type GitHubWebHook

type GitHubWebHook struct {
	// contains filtered or unexported fields
}

GitHubWebHook holds references and data for handling webhook events.

func NewGitHubWebHook

func NewGitHubWebHook(logger *zap.SugaredLogger, db database.Database, mgr *scm.Manager, runner ci.Runner, secret string, streams *stream.StreamServices, tm *auth.TokenManager) *GitHubWebHook

NewGitHubWebHook creates a new webhook to handle POST requests from GitHub to the QuickFeed server.

func (GitHubWebHook) Handle

func (wh GitHubWebHook) Handle() http.HandlerFunc

Handle take POST requests from GitHub, representing Push events associated with course repositories, which then triggers various actions on the QuickFeed backend.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL