Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bradleyfalzon/gopherci
/ functions
Functions
222 in github.com/bradleyfalzon/gopherci
⨍
Functions
222
◇
Types & classes
62
↓ 108 callers
Method
Errorf
(format string, args ...interface{})
internal/logger/logger.go:28
↓ 90 callers
Method
String
String implements the fmt.Stringer interface.
internal/db/db.go:121
↓ 78 callers
Method
Fatalf
(format string, args ...interface{})
internal/logger/logger.go:32
↓ 63 callers
Method
With
With adds context to a logger.
internal/logger/logger.go:35
↓ 48 callers
Method
Error
Error logs, errors. An error should only be logged once.
internal/logger/logger.go:27
↓ 31 callers
Method
Fatal
Fatal logs an error and then immediately terminates execution.
internal/logger/logger.go:31
↓ 29 callers
Method
Info
Info logs general events.
internal/logger/logger.go:23
↓ 22 callers
Method
Close
Close stops gopherci and removes any temporary directories.
integration_test.go:112
↓ 22 callers
Method
Exec
Exec executes a script within the testdata directory with args.
integration_test.go:126
↓ 18 callers
Method
Infof
(format string, args ...interface{})
internal/logger/logger.go:24
↓ 15 callers
Method
Execute
(context.Context, []string)
internal/db/sqldb.go:302
↓ 10 callers
Method
WaitForSuccess
WaitForSuccess waits for the statusContext's ref Status API to be success, will only wait for a short timeout, unless the status is failure or error,
integration_test.go:141
↓ 9 callers
Function
setup
(t *testing.T)
internal/github/handlers_test.go:83
↓ 8 callers
Method
IsEnabled
IsEnabled returns true if an installation is enabled.
internal/github/installation.go:51
↓ 8 callers
Function
NewIntegrationTest
NewIntegrationTest creates an environment for running integration tests by creating file system temporary directories, starting gopherci and setting u
integration_test.go:40
↓ 7 callers
Function
goodPush
()
internal/github/handlers_test.go:578
↓ 6 callers
Method
AddGHInstallation
AddGHInstallation records a new installation.
internal/db/db.go:13
↓ 6 callers
Method
Diff
Diff returns a multi file unified diff as an io.ReadCloser, return nil if no diff could be found or returns an error if an error is found.
internal/web/vcsviewer.go:22
↓ 6 callers
Method
Execute
Execute executes a command and returns the combined stdout and stderr, along with an error if any. Must not be called after Stop(). If the command ret
internal/analyser/analyser.go:44
↓ 6 callers
Function
NewAnalysis
NewAnalysis returns a ready to use analysis.
internal/db/db.go:153
↓ 6 callers
Method
NewInstallation
(installationID int)
internal/github/installation.go:22
↓ 6 callers
Method
errorHandler
errorHandler handles an error message, with an optional description
internal/web/web.go:46
↓ 5 callers
Method
Analyse
Analyse analyses a GitHub event. If cfg.pr is not 0, comments will also be written on the Pull Request.
internal/github/handlers.go:353
↓ 5 callers
Method
Issues
Issues returns all the issues by each tool as a slice.
internal/db/db.go:160
↓ 5 callers
Method
Stop
(context.Context)
internal/db/sqldb.go:303
↓ 5 callers
Method
Wait
Wait waits for messages on queuePush and adds them to the queue. New message are checked for regularly and when a new message is ready f will be calle
internal/queue/memory.go:28
↓ 4 callers
Method
EnableGHInstallation
EnableGHInstallation enables a gh installation
internal/db/mockdb.go:45
↓ 4 callers
Method
Read
Read implements the ConfigReader interface.
internal/analyser/configReader.go:32
↓ 4 callers
Method
SetStatus
SetStatus sets the CI Status API
internal/github/reporters.go:131
↓ 4 callers
Method
integrationInstallationEvent
(e *github.InstallationEvent)
internal/github/handlers.go:248
↓ 3 callers
Method
GetGHInstallation
GetGHInstallation returns an installation for a given installationID, returns nil if no installation was found, or an error occurs.
internal/db/db.go:18
↓ 3 callers
Function
dedupePRIssues
dedupePRIssues deduplicates issues by checking the existing pull request for existing comments and returns comments that don't already exist.
internal/github/reporters.go:43
↓ 3 callers
Function
getPatch
(ctx context.Context, exec Executer, baseRef, headRef string)
internal/analyser/analyser.go:200
↓ 3 callers
Function
stripScheme
stripScheme removes the scheme/protocol and :// from a URL.
internal/github/handlers.go:478
↓ 2 callers
Method
Debug
Debug level for developer concerned debugging, not visible in production.
internal/logger/logger.go:19
↓ 2 callers
Method
Debugf
(format string, args ...interface{})
internal/logger/logger.go:20
↓ 2 callers
Function
DiffIssues
DiffIssues reads a diff and adds the issues to the lines affected. Only hunks with issues will be returned.
internal/web/vcsviewer.go:71
↓ 2 callers
Method
FinishAnalysis
FinishAnalysis marks a status as finished.
internal/db/db.go:27
↓ 2 callers
Method
ForceError
ForceError forces MockDB to return err on all methods that return an error.
internal/db/mockdb.go:24
↓ 2 callers
Method
GetGHInstallation
GetGHInstallation implements DB interface
internal/db/mockdb.go:53
↓ 2 callers
Method
HTMLURL
HTMLURL returns the URL to view the analysis.
internal/db/db.go:169
↓ 2 callers
Method
IsPush
IsPush returns true if the analysis was triggered by a push, or false if it was triggered by pull/merge request.
internal/db/db.go:175
↓ 2 callers
Function
New
New constructs a new Logger.
internal/logger/logger.go:44
↓ 2 callers
Function
NewCommitCommentReporter
NewCommitCommentReporter returns a CommitCommentReporter. commits is the number of commits the analysis is checking (to be displayed in the message) a
internal/github/reporters.go:203
↓ 2 callers
Function
NewFileSystem
NewFileSystem returns an FileSystem which uses the path base to build contained environments on the file system. If memLimit is > 0, limit the amount
internal/analyser/filesystem.go:35
↓ 2 callers
Function
NewGCPPubSubQueue
NewGCPPubSubQueue creates connects to Google Pub/Sub with a topic and subscriber in a one-to-one architecture.
internal/queue/gcp-pubsub.go:48
↓ 2 callers
Function
NewInlineCommitCommentReporter
NewInlineCommitCommentReporter returns a InlineCommitCommentReporter.
internal/github/reporters.go:250
↓ 2 callers
Function
NewPRReviewReporter
NewPRReviewReporter returns a PRReviewReporter.
internal/github/reporters.go:294
↓ 2 callers
Function
NewStatusAPIReporter
NewStatusAPIReporter returns a StatusAPIReporter.
internal/github/reporters.go:120
↓ 2 callers
Function
PushConfig
PushConfig returns an AnalyseConfig for a GitHub Push Event.
internal/github/handlers.go:265
↓ 2 callers
Method
Scan
Scan implements the sql.Scanner interface.
internal/db/db.go:103
↓ 2 callers
Method
Stop
Stop stops the executer and allows it to cleanup, if applicable.
internal/analyser/analyser.go:46
↓ 2 callers
Method
Stop
Stop stops and removes a container ignoring any errors.
internal/analyser/docker.go:166
↓ 2 callers
Method
Wait
Wait waits for messages on queuePush and adds them to the Pub/Sub queue. Upon receiving messages from Pub/Sub, f is invoked with the message. Wait is
internal/queue/gcp-pubsub.go:96
↓ 2 callers
Method
WebHookHandler
WebHookHandler is the net/http handler for github webhooks.
internal/github/handlers.go:43
↓ 2 callers
Function
checkPRAccessible
checkPRAccessible checks to ensure the pull request is accessible. GitHub may have marked a repository as suspicious where some API requests are no lo
internal/github/handlers.go:217
↓ 2 callers
Function
checkPRAction
checkPRAction checks a pull request's action to determine whether the event should continue to be processed. Returns error type *ignoreEvent if the ev
internal/github/handlers.go:180
↓ 2 callers
Function
checkPRAffectsGo
checkPRAffectsGo returns true if a pull request modifies, adds or removes Go files, else returns error if an error occurs.
internal/github/handlers.go:194
↓ 2 callers
Function
checkPushAffectsGo
checkPushAffectsGo returns true if the event modifies, adds or removes Go files.
internal/github/handlers.go:226
↓ 2 callers
Function
exists
(path string)
internal/analyser/filesystem_test.go:76
↓ 2 callers
Function
hasGoExtension
hasGoExtension returns true if the filename has the suffix ".go".
internal/github/handlers.go:244
↓ 2 callers
Function
installAPTPackages
installAptPackages install packages using apt package manager, it expects apt-get update to have already been executed. Can be called with 0 or more p
internal/analyser/analyser.go:224
↓ 2 callers
Method
statusDesc
statusDesc builds a status description based on issues.
internal/github/reporters.go:172
↓ 2 callers
Function
trim
trim trims input b to approximately max by keeping the first and last max/2 bytes. It may be larger due to n bytes suppressed placeholder message.
internal/db/sqldb.go:280
↓ 1 callers
Method
AddGHInstallation
AddGHInstallation implements DB interface
internal/db/mockdb.go:29
↓ 1 callers
Function
Analyse
Analyse downloads a repository set in config in an environment provided by exec, running the series of tools. Writes results to provided analysis, or
internal/analyser/analyser.go:64
↓ 1 callers
Method
AnalysisOutputs
AnalysisOutputs returns the ordered output from the database.
internal/db/db.go:32
↓ 1 callers
Method
Base
(context.Context, Executer)
internal/analyser/refReader.go:13
↓ 1 callers
Method
Base
Base implements the RefReader interface.
internal/analyser/refReader.go:24
↓ 1 callers
Method
Base
Base implements the RefReader interface.
internal/analyser/refReader.go:42
↓ 1 callers
Method
CallbackHandler
CallbackHandler is the net/http handler for github callbacks. This may have only been for old integration behaviour, as it doesn't appear to be docume
internal/github/handlers.go:24
↓ 1 callers
Method
Cleanup
Cleanup runs background cleanup tasks, such as purging old records.
internal/db/sqldb.go:37
↓ 1 callers
Method
Clone
(context.Context, Executer)
internal/analyser/cloner.go:13
↓ 1 callers
Method
Clone
Clone implements the Cloner interface.
internal/analyser/cloner.go:28
↓ 1 callers
Method
Clone
Clone implements the Cloner interface.
internal/analyser/cloner.go:61
↓ 1 callers
Method
Diff
Diff implements the web.VCSReader interface.
internal/github/installation.go:56
↓ 1 callers
Method
ExecRecorder
ExecRecorder records the analysis in the database by wrapping the executer.
internal/db/db.go:34
↓ 1 callers
Method
Execute
Execute implements the Executer interface and runs commands inside a docker container.
internal/analyser/docker.go:117
↓ 1 callers
Function
FileServer
FileServer conveniently sets up a http.FileServer handler to serve static files from a http.FileSystem. https://github.com/go-chi/chi/blob/524a0204461
main.go:215
↓ 1 callers
Method
GetAnalysis
GetAnalysis returns an analysis for a given analysisID, returns nil if no analysis was found, or an error occurs.
internal/db/db.go:30
↓ 1 callers
Method
ListTools
ListTools returns all tools. Returns nil if no tools were found, error will be non-nil if an error occurs.
internal/db/db.go:21
↓ 1 callers
Function
New
New returns a GitHub object for use with GitHub integrations https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/ integrationID
internal/github/github.go:32
↓ 1 callers
Function
NewDocker
NewDocker returns a Docker which uses imageName as a container to build projects. If memLimit is > 0, limit the amount of memory (MiB) a process insid
internal/analyser/docker.go:38
↓ 1 callers
Method
NewExecuter
NewExecuter implements the Analyser interface
internal/analyser/filesystem.go:44
↓ 1 callers
Method
NewExecuter
NewExecuter returns an Executer with the working directory set to $GOPATH/src/<goSrcPath>.
internal/analyser/analyser.go:28
↓ 1 callers
Method
NewExecuter
NewExecuter implements Analyser interface by creating and starting a docker container.
internal/analyser/docker.go:73
↓ 1 callers
Function
NewMemoryQueue
NewMemoryQueue creates a new in memory queue
internal/queue/memory.go:21
↓ 1 callers
Function
NewMockDB
NewMockDB returns an MockDB
internal/db/mockdb.go:17
↓ 1 callers
Function
NewPRCommentReporter
NewPRCommentReporter returns a PRCommentReporter.
internal/github/reporters.go:31
↓ 1 callers
Function
NewVCS
NewVCS returns a VCSReader for a given analysis.
internal/web/vcsviewer.go:26
↓ 1 callers
Method
NotFoundHandler
NotFoundHandler displays a 404 not found error
internal/web/web.go:41
↓ 1 callers
Function
PullRequestConfig
PullRequestConfig return an AnalyseConfig for a GitHub Pull Request.
internal/github/handlers.go:300
↓ 1 callers
Method
Read
(context.Context, Executer)
internal/analyser/configReader.go:20
↓ 1 callers
Method
RemoveGHInstallation
RemoveGHInstallation removes an installation.
internal/db/db.go:15
↓ 1 callers
Method
RemoveGHInstallation
RemoveGHInstallation implements DB interface
internal/db/mockdb.go:39
↓ 1 callers
Method
Report
(context.Context, []db.Issue)
internal/analyser/reporter.go:11
↓ 1 callers
Method
Report
Report implements the analyser.Reporter interface.
internal/github/reporters.go:69
↓ 1 callers
Method
Report
Report implements the analyser.Reporter interface.
internal/github/reporters.go:215
↓ 1 callers
Method
Report
Report implements the analyser.Reporter interface.
internal/github/reporters.go:260
↓ 1 callers
Method
Report
Report implements the analyser.Reporter interface.
internal/github/reporters.go:305
next →
1–100 of 222, ranked by callers