githubint

package
v1.0.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoGithubAppInstallation = fmt.Errorf("no github app installations found")

Functions

func NewGithubClient

func NewGithubClient(installationID int) (githubClient, error)

Types

type GithubIntegration

type GithubIntegration struct {
	utils.FireAndForgetSynchronizer
	// contains filtered or unexported fields
}

func NewGithubIntegration

func NewGithubIntegration(
	githubAppInstallationRepository shared.GithubAppInstallationRepository,
	externalUserRepository shared.ExternalUserRepository,
	dependencyVulnRepository shared.DependencyVulnRepository,
	firstPartyVulnRepository shared.FirstPartyVulnRepository,
	vulnEventRepository shared.VulnEventRepository,
	aggregatedVulnRepository shared.VulnRepository,
	assetRepository shared.AssetRepository,
	assetVersionRepository shared.AssetVersionRepository,
	componentRepository shared.ComponentRepository,
	licenseRiskRepository shared.LicenseRiskRepository,
	orgRepository shared.OrganizationRepository,
	projectRepository shared.ProjectRepository,
	statisticsService shared.StatisticsService,
	synchronizer utils.FireAndForgetSynchronizer) *GithubIntegration

func (*GithubIntegration) CompareIssueStatesAndResolveDifferences

func (githubIntegration *GithubIntegration) CompareIssueStatesAndResolveDifferences(asset models.Asset, vulnsWithTickets []models.DependencyVuln) error

func (*GithubIntegration) CreateIssue

func (githubIntegration *GithubIntegration) CreateIssue(ctx context.Context, asset models.Asset, assetVersionSlug string, vuln models.Vuln, projectSlug string, orgSlug string, justification string, userID string) error

func (*GithubIntegration) CreateLabels

func (githubIntegration *GithubIntegration) CreateLabels(ctx context.Context, asset models.Asset) error

func (*GithubIntegration) FinishInstallation

func (githubIntegration *GithubIntegration) FinishInstallation(ctx shared.Context) error

func (*GithubIntegration) GetID

func (githubIntegration *GithubIntegration) GetID() shared.IntegrationID

func (*GithubIntegration) GetOrg

func (githubIntegration *GithubIntegration) GetOrg(ctx context.Context, userID string, providerID string, groupID string) (models.Org, error)

func (*GithubIntegration) GetRoleInGroup

func (githubIntegration *GithubIntegration) GetRoleInGroup(ctx context.Context, userID string, providerID string, groupID string) (shared.Role, error)

func (*GithubIntegration) GetRoleInProject

func (githubIntegration *GithubIntegration) GetRoleInProject(ctx context.Context, userID string, providerID string, projectID string) (shared.Role, error)

func (*GithubIntegration) HandleEvent

func (githubIntegration *GithubIntegration) HandleEvent(event any) error

func (*GithubIntegration) HandleWebhook

func (githubIntegration *GithubIntegration) HandleWebhook(ctx shared.Context) error

func (*GithubIntegration) HasAccessToExternalEntityProvider

func (githubIntegration *GithubIntegration) HasAccessToExternalEntityProvider(ctx shared.Context, externalEntityProviderID string) (bool, error)

func (*GithubIntegration) ListGroups

func (githubIntegration *GithubIntegration) ListGroups(ctx context.Context, userID string, providerID string) ([]models.Project, []shared.Role, error)

func (*GithubIntegration) ListOrgs

func (githubIntegration *GithubIntegration) ListOrgs(ctx shared.Context) ([]models.Org, error)

func (*GithubIntegration) ListProjects

func (githubIntegration *GithubIntegration) ListProjects(ctx context.Context, userID string, providerID string, groupID string) ([]models.Asset, []shared.Role, error)

func (*GithubIntegration) ListRepositories

func (githubIntegration *GithubIntegration) ListRepositories(ctx shared.Context) ([]dtos.GitRepository, error)

func (*GithubIntegration) UpdateIssue

func (githubIntegration *GithubIntegration) UpdateIssue(ctx context.Context, asset models.Asset, assetVersionSlug string, vuln models.Vuln) error

func (*GithubIntegration) WantsToFinishInstallation

func (githubIntegration *GithubIntegration) WantsToFinishInstallation(ctx shared.Context) bool

func (*GithubIntegration) WantsToHandleWebhook

func (githubIntegration *GithubIntegration) WantsToHandleWebhook(ctx shared.Context) bool

Jump to

Keyboard shortcuts

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