From 3883ee9614375920a8821b5aff47c1e4b00bc944 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 16 Apr 2019 09:27:15 +0800 Subject: [PATCH 1/7] fix some typos --- .drone.jsonnet | 2 +- cmd/drone-agent/main.go | 4 ++-- cmd/drone-controller/main.go | 2 +- cmd/drone-server/main.go | 2 +- core/admission.go | 2 +- operator/runner/runner.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.drone.jsonnet b/.drone.jsonnet index 95fe2b0da..aa31430bc 100644 --- a/.drone.jsonnet +++ b/.drone.jsonnet @@ -4,7 +4,7 @@ local golang = "golang:1.11"; # defines a temporary volume so that the Go cache can -# be shared with all pipeine steps. +# be shared with all pipeline steps. local volumes = [ { name: "gopath", diff --git a/cmd/drone-agent/main.go b/cmd/drone-agent/main.go index d93c56b61..3af558474 100644 --- a/cmd/drone-agent/main.go +++ b/cmd/drone-agent/main.go @@ -82,7 +82,7 @@ func main() { Errorln("cannot ping the docker daemon") time.Sleep(time.Second) } else { - logrus.Debugln("succussfully pinged the docker daemon") + logrus.Debugln("successfully pinged the docker daemon") break } } @@ -119,7 +119,7 @@ func main() { } } -// helper funciton configures the logging. +// helper function configures the logging. func initLogging(c config.Config) { if c.Logging.Debug { logrus.SetLevel(logrus.DebugLevel) diff --git a/cmd/drone-controller/main.go b/cmd/drone-controller/main.go index 91a67424f..286fd58ec 100644 --- a/cmd/drone-controller/main.go +++ b/cmd/drone-controller/main.go @@ -128,7 +128,7 @@ func isKubernetes() bool { return os.Getenv("KUBERNETES_SERVICE_HOST") != "" } -// helper funciton configures the logging. +// helper function configures the logging. func initLogging(c config.Config) { if c.Logging.Debug { logrus.SetLevel(logrus.DebugLevel) diff --git a/cmd/drone-server/main.go b/cmd/drone-server/main.go index d39c6c537..315336f17 100644 --- a/cmd/drone-server/main.go +++ b/cmd/drone-server/main.go @@ -131,7 +131,7 @@ func main() { } } -// helper funciton configures the logging. +// helper function configures the logging. func initLogging(c config.Config) { if c.Logging.Debug { logrus.SetLevel(logrus.DebugLevel) diff --git a/core/admission.go b/core/admission.go index 5d3388eed..d3b237118 100644 --- a/core/admission.go +++ b/core/admission.go @@ -18,7 +18,7 @@ import "context" // AdmissionService grants access to the system. The service can // be used to restrict access to authorized users, such as -// members of an organiozation in your soruce control management +// members of an organiozation in your source control management // system. type AdmissionService interface { Admit(context.Context, *User) error diff --git a/operator/runner/runner.go b/operator/runner/runner.go index f743cb6e9..f733729c4 100644 --- a/operator/runner/runner.go +++ b/operator/runner/runner.go @@ -536,7 +536,7 @@ func (r *Runner) start(ctx context.Context) error { default: // This error is ignored on purpose. The system // should not exit the runner on error. The run - // funciton logs all errors, which should be enough + // function logs all errors, which should be enough // to surface potential issues to an administrator. r.poll(ctx) } From 4d47ac1861feb26c80eb167a67493eb506e945b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 16 Apr 2019 09:47:25 +0800 Subject: [PATCH 2/7] fix some typos --- handler/api/acl/repo.go | 2 +- handler/api/auth/auth.go | 2 +- handler/web/login.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/handler/api/acl/repo.go b/handler/api/acl/repo.go index 2f614d4f4..1faa14c0f 100644 --- a/handler/api/acl/repo.go +++ b/handler/api/acl/repo.go @@ -125,7 +125,7 @@ func InjectRepository( if err != nil { log.WithError(err).Debugln("api: cannot cache repository permissions") } else { - log.Debugln("api: repository permissions synchrnoized") + log.Debugln("api: repository permissions synchronized") } } diff --git a/handler/api/auth/auth.go b/handler/api/auth/auth.go index e002c1603..68d25d1f9 100644 --- a/handler/api/auth/auth.go +++ b/handler/api/auth/auth.go @@ -22,7 +22,7 @@ import ( "github.com/drone/drone/logger" ) -// HandleAuthentication returns an http.HandlerFunc middlewrae that authenticates +// HandleAuthentication returns an http.HandlerFunc middleware that authenticates // the http.Request and errors if the account cannot be authenticated. func HandleAuthentication(session core.Session) func(http.Handler) http.Handler { return func(next http.Handler) http.Handler { diff --git a/handler/web/login.go b/handler/web/login.go index 59c15fad5..e4f885ced 100644 --- a/handler/web/login.go +++ b/handler/web/login.go @@ -141,7 +141,7 @@ func HandleLogin( user.Expiry = tok.Expires.Unix() } - // If the user account has never been synchrnoized we + // If the user account has never been synchronized we // execute the synchonrization logic. if time.Unix(user.Synced, 0).Add(syncPeriod).Before(time.Now()) { user.Syncing = true From 1042b18716df33b40e4a687c862bbec29f93cdc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 16 Apr 2019 09:55:38 +0800 Subject: [PATCH 3/7] fix some typos --- cmd/drone-server/inject_login.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/drone-server/inject_login.go b/cmd/drone-server/inject_login.go index 992ee7340..c3115fa3a 100644 --- a/cmd/drone-server/inject_login.go +++ b/cmd/drone-server/inject_login.go @@ -36,7 +36,7 @@ var loginSet = wire.NewSet( ) // provideLogin is a Wire provider function that returns an -// autenticator based on the environment configuration. +// authenticator based on the environment configuration. func provideLogin(config config.Config) login.Middleware { switch { case config.Bitbucket.ClientID != "": @@ -57,7 +57,7 @@ func provideLogin(config config.Config) login.Middleware { } // provideBitbucketLogin is a Wire provider function that -// returns a Bitbucket Cloud autenticator based on the +// returns a Bitbucket Cloud authenticator based on the // environment configuration. func provideBitbucketLogin(config config.Config) login.Middleware { if config.Bitbucket.ClientID == "" { @@ -71,7 +71,7 @@ func provideBitbucketLogin(config config.Config) login.Middleware { } // provideGithubLogin is a Wire provider function that returns -// a GitHub autenticator based on the environment configuration. +// a GitHub authenticator based on the environment configuration. func provideGithubLogin(config config.Config) login.Middleware { if config.Github.ClientID == "" { return nil @@ -87,7 +87,7 @@ func provideGithubLogin(config config.Config) login.Middleware { } // provideGiteaLogin is a Wire provider function that returns -// a Gitea autenticator based on the environment configuration. +// a Gitea authenticator based on the environment configuration. func provideGiteaLogin(config config.Config) login.Middleware { if config.Gitea.Server == "" { return nil @@ -112,7 +112,7 @@ func provideGiteaLogin(config config.Config) login.Middleware { } // provideGitlabLogin is a Wire provider function that returns -// a GitLab autenticator based on the environment configuration. +// a GitLab authenticator based on the environment configuration. func provideGitlabLogin(config config.Config) login.Middleware { if config.GitLab.ClientID == "" { return nil @@ -127,7 +127,7 @@ func provideGitlabLogin(config config.Config) login.Middleware { } // provideGogsLogin is a Wire provider function that returns -// a Gogs autenticator based on the environment configuration. +// a Gogs authenticator based on the environment configuration. func provideGogsLogin(config config.Config) login.Middleware { if config.Gogs.Server == "" { return nil @@ -141,7 +141,7 @@ func provideGogsLogin(config config.Config) login.Middleware { } // provideStashLogin is a Wire provider function that returns -// a Stash autenticator based on the environment configuration. +// a Stash authenticator based on the environment configuration. func provideStashLogin(config config.Config) login.Middleware { if config.Stash.ConsumerKey == "" { return nil From acc6c8282b49c45e81bd6cf3de1d054c1ee8e316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 16 Apr 2019 10:03:49 +0800 Subject: [PATCH 4/7] fix some typos --- core/admission.go | 2 +- operator/manager/manager.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/admission.go b/core/admission.go index d3b237118..ad682b2f8 100644 --- a/core/admission.go +++ b/core/admission.go @@ -18,7 +18,7 @@ import "context" // AdmissionService grants access to the system. The service can // be used to restrict access to authorized users, such as -// members of an organiozation in your source control management +// members of an organization in your source control management // system. type AdmissionService interface { Admit(context.Context, *User) error diff --git a/operator/manager/manager.go b/operator/manager/manager.go index 2d5eee708..2823b522b 100644 --- a/operator/manager/manager.go +++ b/operator/manager/manager.go @@ -438,7 +438,7 @@ func (m *Manager) Netrc(ctx context.Context, id int64) (*core.Netrc, error) { if err != nil { logger = logger.WithError(err) logger = logger.WithField("repo.name", repo.Slug) - logger.Warnln("manager: cannot gernerate netrc") + logger.Warnln("manager: cannot generate netrc") } return netrc, err } From d9244258907e1bbdb01b422213fe1c193658ba09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 16 Apr 2019 10:08:21 +0800 Subject: [PATCH 5/7] fix some typos --- handler/api/ccmenu/cc.go | 2 +- operator/manager/rpc/client.go | 8 ++++---- operator/manager/rpc/client_test.go | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/handler/api/ccmenu/cc.go b/handler/api/ccmenu/cc.go index cf4da566b..d55fdd03a 100644 --- a/handler/api/ccmenu/cc.go +++ b/handler/api/ccmenu/cc.go @@ -29,7 +29,7 @@ type CCProject struct { WebURL string `xml:"webUrl,attr"` } -// New creates a new CCPojrect from the Repository and Build details. +// New creates a new CCProject from the Repository and Build details. func New(r *core.Repository, b *core.Build, link string) *CCProjects { proj := &CCProject{ Name: r.Slug, diff --git a/operator/manager/rpc/client.go b/operator/manager/rpc/client.go index ef2569387..b5bf4ce1f 100644 --- a/operator/manager/rpc/client.go +++ b/operator/manager/rpc/client.go @@ -122,7 +122,7 @@ func (s *Client) Before(ctx context.Context, step *core.Step) error { if err != nil { return err } - // the step ID and version (optomistic locking) are + // the step ID and version (optimistic locking) are // updated when the step is created. Copy the updated // values back to the original step object. step.ID = out.ID @@ -138,7 +138,7 @@ func (s *Client) After(ctx context.Context, step *core.Step) error { if err != nil { return err } - // the step version (optomistic locking) is updated + // the step version (optimistic locking) is updated // when the step is created. Copy the updated values // back to the original step object. step.Version = out.Version @@ -173,7 +173,7 @@ func (s *Client) AfterAll(ctx context.Context, stage *core.Stage) error { if err != nil { return err } - // the stage timestamps and version (optomistic locking) + // the stage timestamps and version (optimistic locking) // are updated when the step is created. Copy the updated // values back to the original step object. stage.Version = out.Version @@ -237,7 +237,7 @@ func (s *Client) send(ctx context.Context, path string, in, out interface{}) err } // Check the response for a 409 conflict. This indicates an - // optimtistic lock error, in which case multiple clients may + // optimistic lock error, in which case multiple clients may // be attempting to update the same record. Convert this error // code to a proper error. if res.StatusCode == 409 { diff --git a/operator/manager/rpc/client_test.go b/operator/manager/rpc/client_test.go index 9fcbd40f8..da73ca20b 100644 --- a/operator/manager/rpc/client_test.go +++ b/operator/manager/rpc/client_test.go @@ -342,7 +342,7 @@ func TestAfterAll(t *testing.T) { } } -func TestBefore_OptomisticLock(t *testing.T) { +func TestBefore_OptimisticLock(t *testing.T) { defer gock.Off() gock.New("http://drone.company.com"). @@ -353,14 +353,14 @@ func TestBefore_OptomisticLock(t *testing.T) { gock.InterceptClient(client.client.HTTPClient) err := client.Before(noContext, new(core.Step)) if err != db.ErrOptimisticLock { - t.Errorf("Want optomistic lock error") + t.Errorf("Want optimistic lock error") } if gock.IsPending() { t.Errorf("Unfinished requests") } } -func TestAfter_OptomisticLock(t *testing.T) { +func TestAfter_OptimisticLock(t *testing.T) { defer gock.Off() gock.New("http://drone.company.com"). @@ -371,14 +371,14 @@ func TestAfter_OptomisticLock(t *testing.T) { gock.InterceptClient(client.client.HTTPClient) err := client.After(noContext, new(core.Step)) if err != db.ErrOptimisticLock { - t.Errorf("Want optomistic lock error") + t.Errorf("Want optimistic lock error") } if gock.IsPending() { t.Errorf("Unfinished requests") } } -func TestBeforeAll_OptomisticLock(t *testing.T) { +func TestBeforeAll_OptimisticLock(t *testing.T) { defer gock.Off() gock.New("http://drone.company.com"). @@ -389,14 +389,14 @@ func TestBeforeAll_OptomisticLock(t *testing.T) { gock.InterceptClient(client.client.HTTPClient) err := client.BeforeAll(noContext, new(core.Stage)) if err != db.ErrOptimisticLock { - t.Errorf("Want optomistic lock error") + t.Errorf("Want optimistic lock error") } if gock.IsPending() { t.Errorf("Unfinished requests") } } -func TestAfterAll_OptomisticLock(t *testing.T) { +func TestAfterAll_OptimisticLock(t *testing.T) { defer gock.Off() gock.New("http://drone.company.com"). @@ -407,7 +407,7 @@ func TestAfterAll_OptomisticLock(t *testing.T) { gock.InterceptClient(client.client.HTTPClient) err := client.AfterAll(noContext, new(core.Stage)) if err != db.ErrOptimisticLock { - t.Errorf("Want optomistic lock error") + t.Errorf("Want optimistic lock error") } if gock.IsPending() { t.Errorf("Unfinished requests") From bfc20fc17c48da026b42802f70df1ab31d1b5578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E8=83=96?= Date: Tue, 16 Apr 2019 10:14:20 +0800 Subject: [PATCH 6/7] fix some typos --- trigger/cron/cron_test.go | 6 +++--- trigger/trigger_test.go | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/trigger/cron/cron_test.go b/trigger/cron/cron_test.go index 58ef73926..caec444b4 100644 --- a/trigger/cron/cron_test.go +++ b/trigger/cron/cron_test.go @@ -35,9 +35,9 @@ func TestCron(t *testing.T) { defer controller.Finish() checkBuild := func(_ context.Context, _ *core.Repository, hook *core.Hook) { - ignoreHookFileds := cmpopts.IgnoreFields(core.Hook{}, + ignoreHookFields := cmpopts.IgnoreFields(core.Hook{}, "Source", "Before") - if diff := cmp.Diff(hook, dummyHook, ignoreHookFileds); diff != "" { + if diff := cmp.Diff(hook, dummyHook, ignoreHookFields); diff != "" { t.Errorf(diff) } } @@ -484,6 +484,6 @@ var ( }, } - ignoreBuildFileds = cmpopts.IgnoreFields(core.Build{}, + ignoreBuildFields = cmpopts.IgnoreFields(core.Build{}, "Created", "Updated") ) diff --git a/trigger/trigger_test.go b/trigger/trigger_test.go index 04cf6f47d..a042f2c84 100644 --- a/trigger/trigger_test.go +++ b/trigger/trigger_test.go @@ -33,19 +33,19 @@ func TestTrigger(t *testing.T) { defer controller.Finish() checkBuild := func(_ context.Context, build *core.Build, stages []*core.Stage) { - if diff := cmp.Diff(build, dummyBuild, ignoreBuildFileds); diff != "" { + if diff := cmp.Diff(build, dummyBuild, ignoreBuildFields); diff != "" { t.Errorf(diff) } - if diff := cmp.Diff(stages, dummyStages, ignoreStageFileds); diff != "" { + if diff := cmp.Diff(stages, dummyStages, ignoreStageFields); diff != "" { t.Errorf(diff) } } checkStatus := func(_ context.Context, _ *core.User, req *core.StatusInput) error { - if diff := cmp.Diff(req.Build, dummyBuild, ignoreBuildFileds); diff != "" { + if diff := cmp.Diff(req.Build, dummyBuild, ignoreBuildFields); diff != "" { t.Errorf(diff) } - if diff := cmp.Diff(req.Repo, dummyRepo, ignoreStageFileds); diff != "" { + if diff := cmp.Diff(req.Repo, dummyRepo, ignoreStageFields); diff != "" { t.Errorf(diff) } return nil @@ -88,7 +88,7 @@ func TestTrigger(t *testing.T) { t.Error(err) return } - if diff := cmp.Diff(build, dummyBuild, ignoreBuildFileds); diff != "" { + if diff := cmp.Diff(build, dummyBuild, ignoreBuildFields); diff != "" { t.Errorf(diff) } } @@ -487,9 +487,9 @@ var ( Data: "kind: pipeline\ntrigger: { event: { exclude: push } }", } - ignoreBuildFileds = cmpopts.IgnoreFields(core.Build{}, + ignoreBuildFields = cmpopts.IgnoreFields(core.Build{}, "Created", "Updated") - ignoreStageFileds = cmpopts.IgnoreFields(core.Stage{}, + ignoreStageFields = cmpopts.IgnoreFields(core.Stage{}, "Created", "Updated") ) From 49bbaf4a113bbebfa21cf604cad9aa1503c3f04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=89=AC?= Date: Tue, 16 Apr 2019 11:05:41 +0800 Subject: [PATCH 7/7] fix some typos --- core/perm.go | 2 +- core/pubsub.go | 2 +- core/repo.go | 2 +- core/syncer.go | 2 +- handler/api/repos/repair.go | 2 +- handler/api/user/sync.go | 4 ++-- operator/runner/runner.go | 2 +- plugin/admission/nobot.go | 2 +- plugin/admission/open.go | 2 +- plugin/registry/combine.go | 2 +- service/hook/parser/parse.go | 2 +- service/repo/util.go | 2 +- service/syncer/syncer.go | 2 +- store/shared/db/db.go | 2 +- trigger/cron/cron_test.go | 2 +- trigger/skip.go | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/perm.go b/core/perm.go index f0dff1594..4479ed365 100644 --- a/core/perm.go +++ b/core/perm.go @@ -47,7 +47,7 @@ type ( } // PermStore defines operations for working with - // repostiory permissions. + // repository permissions. PermStore interface { // Find returns a project member from the // datastore. diff --git a/core/pubsub.go b/core/pubsub.go index a9993d5d1..c1e2d961e 100644 --- a/core/pubsub.go +++ b/core/pubsub.go @@ -23,7 +23,7 @@ type Message struct { Data []byte } -// Pubsub provides publish subscriber capablities, distributing +// Pubsub provides publish subscriber capabilities, distributing // messages from multiple publishers to multiple subscribers. type Pubsub interface { // Publish publishes the message to all subscribers. diff --git a/core/repo.go b/core/repo.go index 67de5cadc..def03c147 100644 --- a/core/repo.go +++ b/core/repo.go @@ -77,7 +77,7 @@ type ( ListRecent(context.Context, int64) ([]*Repository, error) // ListIncomplete returns a non-unique repository list form - // the datastore with incmoplete builds. + // the datastore with incomplete builds. ListIncomplete(context.Context) ([]*Repository, error) // Find returns a repository from the datastore. diff --git a/core/syncer.go b/core/syncer.go index a3df3d768..6c2ec6e1b 100644 --- a/core/syncer.go +++ b/core/syncer.go @@ -16,7 +16,7 @@ package core import "context" -// Syncer synchonrizes the account repository list. +// Syncer synchronizes the account repository list. type Syncer interface { Sync(context.Context, *User) (*Batch, error) } diff --git a/handler/api/repos/repair.go b/handler/api/repos/repair.go index 683c17d98..8c94078eb 100644 --- a/handler/api/repos/repair.go +++ b/handler/api/repos/repair.go @@ -26,7 +26,7 @@ import ( // HandleRepair returns an http.HandlerFunc that processes http // requests to repair the repository hooks and sync the repository -// deetails. +// details. func HandleRepair( hooks core.HookService, repoz core.RepositoryService, diff --git a/handler/api/user/sync.go b/handler/api/user/sync.go index 9250aff5b..f35e776f1 100644 --- a/handler/api/user/sync.go +++ b/handler/api/user/sync.go @@ -39,7 +39,7 @@ func HandleSync(syncer core.Syncer, repos core.RepositoryStore) http.HandlerFunc _, err := syncer.Sync(ctx, viewer) if err != nil { logger.FromContext(ctx).WithError(err). - Debugln("api: cannot synchrnoize account") + Debugln("api: cannot synchronize account") } }(ctx, viewer) w.WriteHeader(204) @@ -50,7 +50,7 @@ func HandleSync(syncer core.Syncer, repos core.RepositoryStore) http.HandlerFunc if err != nil { render.InternalError(w, err) logger.FromRequest(r).WithError(err). - Warnln("api: cannot synchrnoize account") + Warnln("api: cannot synchronize account") return } list, err := repos.List(r.Context(), viewer.ID) diff --git a/operator/runner/runner.go b/operator/runner/runner.go index f733729c4..e2ab2d3d1 100644 --- a/operator/runner/runner.go +++ b/operator/runner/runner.go @@ -517,7 +517,7 @@ func (r *Runner) Run(ctx context.Context, id int64) error { } // Start starts N build runner processes. Each process polls -// the server for pednding builds to execute. +// the server for pending builds to execute. func (r *Runner) Start(ctx context.Context, n int) error { var g errgroup.Group for i := 0; i < n; i++ { diff --git a/plugin/admission/nobot.go b/plugin/admission/nobot.go index ab2ab1d8e..97193246b 100644 --- a/plugin/admission/nobot.go +++ b/plugin/admission/nobot.go @@ -18,7 +18,7 @@ import ( // user is a human being. var ErrCannotVerify = errors.New("Cannot verify user authenticity") -// Nobot enfoces an admission policy that restricts access to +// Nobot enforces an admission policy that restricts access to // users accounts that were recently created and may be bots. // The policy expects the source control management system will // identify and remove the bot accounts before they would be diff --git a/plugin/admission/open.go b/plugin/admission/open.go index 80b60bc62..5a3e97fb8 100644 --- a/plugin/admission/open.go +++ b/plugin/admission/open.go @@ -25,7 +25,7 @@ import ( // user account and admissions are closed. var ErrClosed = errors.New("User registration is disabled") -// Open enfoces an open admission policy by default unless +// Open enforces an open admission policy by default unless // disabled. func Open(disabled bool) core.AdmissionService { return &closed{disabled: disabled} diff --git a/plugin/registry/combine.go b/plugin/registry/combine.go index 022cdc67e..bb5da5467 100644 --- a/plugin/registry/combine.go +++ b/plugin/registry/combine.go @@ -44,7 +44,7 @@ func (c *combined) List(ctx context.Context, req *core.RegistryArgs) ([]*core.Re } // if trace level debugging is enabled we print // all registry credentials retrieved from the - // various registy sources. + // various registry sources. logger := logger.FromContext(ctx) if logrus.IsLevelEnabled(logrus.TraceLevel) { if len(all) == 0 { diff --git a/service/hook/parser/parse.go b/service/hook/parser/parse.go index 3a2d255f8..c566187b1 100644 --- a/service/hook/parser/parse.go +++ b/service/hook/parser/parse.go @@ -49,7 +49,7 @@ import ( // TODO(bradrydzewski): gitea, push hook missing repository html url // TODO(bradrydzewski): bitbucket, pull request hook missing author email. -// TODO(bradrydzewski): bitbucket, hooks missing defualt repository branch. +// TODO(bradrydzewski): bitbucket, hooks missing default repository branch. // TODO(bradrydzewski): github, push hook timestamp is negative value. // TODO(bradrydzewski): github, pull request message is empty diff --git a/service/repo/util.go b/service/repo/util.go index 4801eb202..607d05e49 100644 --- a/service/repo/util.go +++ b/service/repo/util.go @@ -38,7 +38,7 @@ func convertRepository(src *scm.Repository) *core.Repository { } // convertVisibility is a helper function that returns the -// repository visibliity based on the privacy flag. +// repository visibility based on the privacy flag. func convertVisibility(src *scm.Repository) string { switch { case src.Private == true: diff --git a/service/syncer/syncer.go b/service/syncer/syncer.go index be9d02578..10917ed8e 100644 --- a/service/syncer/syncer.go +++ b/service/syncer/syncer.go @@ -55,7 +55,7 @@ func (s *Synchronizer) SetFilter(fn FilterFunc) { s.match = fn } -// Sync synchonrizes the user repository list in 6 easy steps. +// Sync synchronizes the user repository list in 6 easy steps. func (s *Synchronizer) Sync(ctx context.Context, user *core.User) (*core.Batch, error) { logger := logrus.WithField("login", user.Login) logger.Debugln("syncer: begin repository sync") diff --git a/store/shared/db/db.go b/store/shared/db/db.go index 2d36b4af6..6e6bb4f39 100644 --- a/store/shared/db/db.go +++ b/store/shared/db/db.go @@ -121,7 +121,7 @@ func (db *DB) Driver() Driver { return db.driver } -// Close cloes the database connection. +// Close closes the database connection. func (db *DB) Close() error { return db.conn.Close() } diff --git a/trigger/cron/cron_test.go b/trigger/cron/cron_test.go index caec444b4..dc32c6910 100644 --- a/trigger/cron/cron_test.go +++ b/trigger/cron/cron_test.go @@ -95,7 +95,7 @@ func TestCron_Cancel(t *testing.T) { // This unit tests demonstrates that if an error is encountered // when returning a list of ready cronjobs, the process exits -// immadiately with an error message. +// immediately with an error message. func TestCron_ErrorList(t *testing.T) { controller := gomock.NewController(t) defer controller.Finish() diff --git a/trigger/skip.go b/trigger/skip.go index 7e1f56a88..f211acb0f 100644 --- a/trigger/skip.go +++ b/trigger/skip.go @@ -77,7 +77,7 @@ func skipMessageEval(str string) bool { // func skipPaths(document *config.Config, paths []string) bool { // switch { // // changed files are only returned for push and pull request -// // events. If the list of changed files is empty the sytem will +// // events. If the list of changed files is empty the system will // // force-run all pipelines and pipeline steps // case len(paths) == 0: // return false