From 023d03dd61f0dc9c919631a8ec5c395aaf26e42a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 9 Nov 2022 02:12:17 -0500 Subject: [PATCH] Spelling (#1405) Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- .woodpecker/docs.yml | 2 +- CHANGELOG.md | 14 +++++++------- charts/woodpecker-agent/values.yaml | 2 +- cmd/server/flags.go | 2 +- cmd/server/server.go | 4 ++-- cmd/server/setup.go | 4 ++-- docs/docs/30-administration/10-server-config.md | 2 +- .../100-external-configuration-api.md | 2 +- docs/docs/91-migrations.md | 2 +- docs/docs/92-awesome.md | 2 +- docs/docs/92-development/01-getting-started.md | 4 ++-- docs/plugins/woodpecker-plugins/plugins.json | 2 +- .../30-administration/10-server-config.md | 2 +- .../30-administration/15-agent-config.md | 4 ++-- docs/versioned_docs/version-0.15/91-migrations.md | 2 +- docs/versioned_docs/version-0.15/92-awesome.md | 2 +- .../92-development/01-getting-started.md | 4 ++-- pipeline/backend/local/local.go | 2 +- server/api/pipeline.go | 2 +- server/api/stream.go | 2 +- server/cron/cron.go | 2 +- server/forge/bitbucket/bitbucket.go | 4 ++-- server/forge/bitbucket/internal/types.go | 4 ++-- server/forge/bitbucketserver/bitbucketserver.go | 2 +- server/forge/coding/coding.go | 4 ++-- server/forge/coding/coding_test.go | 2 +- server/forge/coding/hook.go | 4 ++-- server/forge/coding/hook_test.go | 2 +- server/forge/coding/internal/webhook.go | 2 +- server/forge/gitea/gitea.go | 4 ++-- server/forge/github/fixtures/hooks.go | 2 +- server/forge/github/github.go | 4 ++-- server/forge/github/github_test.go | 2 +- server/forge/github/parse_test.go | 2 +- server/forge/gitlab/gitlab.go | 2 +- server/forge/gitlab/testdata/projects.go | 4 ++-- server/forge/gitlab/testdata/testdata.go | 4 ++-- server/forge/gogs/gogs_test.go | 4 ++-- server/forge/remote.go | 4 ++-- server/logging/log.go | 2 +- server/model/step.go | 2 +- server/pubsub/pubsub.go | 2 +- .../datastore/migration/000_legacy_to_xorm.go | 2 +- server/store/store.go | 4 ++-- server/swagger/files/swagger.yml | 4 ++-- shared/constant/constant.go | 2 +- shared/utils/context.go | 8 ++++---- web/src/compositions/useTabs.ts | 2 +- web/src/store/pipelines.ts | 4 ++-- 49 files changed, 76 insertions(+), 76 deletions(-) diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 9ee62d6b5..4bb433f83 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -4,7 +4,7 @@ variables: - &when_path - "docs/**" - ".woodpecker/docs.yml" - # since we genereate docs for cli tool we have to watch this too + # since we generate docs for cli tool we have to watch this too - "cli/**" - "cmd/cli/**" diff --git a/CHANGELOG.md b/CHANGELOG.md index a0983ca4d..eaf378071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,7 @@ * SECURITY * Update github.com/containerd/containerd (#978) (#980) * BUGFIXES - * Return to page after clikcing login at navbar (#975) (#976) + * Return to page after clicking login at navbar (#975) (#976) ## [0.15.2](https://github.com/woodpecker-ci/woodpecker/releases/tag/v0.15.2) - 2022-06-14 @@ -84,7 +84,7 @@ * Skip nested GitLab repositories during sync (#656), (#652) * Build proc tree function should not depend on sorted procs list (#647) * Fix sqlite migration on column drop of abnormal schemas (#629) - * Fix gRPC incomapatability in helm chart (#627) + * Fix gRPC incompatibility in helm chart (#627) * Fix new pipeline not published to UI if protected repo mode enabled (#619) * Dont panic, report error back (#582) * Improve status updates (#561) @@ -105,7 +105,7 @@ * Add page to view all projects of a user / group (#741) * Let non required migration tasks fail and continue (#729) * Improve pipeline compiler (#699) - * Support ChangedFiles for Github & Gitlab PRs and pushes and Gitea pushes (#697) + * Support ChangedFiles for GitHub & Gitlab PRs and pushes and Gitea pushes (#697) * Remove unused flags / options (#693) * Automatically determine platform of agent (#690) * Build ref link point to commit not compare if only one commit was pushed (#673) @@ -147,13 +147,13 @@ * Serve index.html directly without template (#539) * Add linter revive, unused, ineffassign, varcheck, structcheck, staticcheck, whitespace, misspell (#550), (#551), (#554), (#538), (#537), (#535), (#531), (#530) * Rename struct field and add new types into server/model's (#523) - * Update database in one transaction on syncing user repositorys (#513) + * Update database in one transaction on syncing user repositories (#513) * Format code with 'simplify' flag and check via CI (#509) * Use Goblin Assert as intended (#501) * Embedding libcompose types for yaml parsing (#495) * Use std method to get SystemCertPool (#488) * Upgrade urfave/cli to v2 (#483) - * Remove some wrapper and make code more redable (#478) + * Remove some wrapper and make code more readable (#478) * More logging and refactor (#457) * Simplify routes (#437) * Move api-routes to separate file (#434) @@ -229,7 +229,7 @@ ## [v0.14.2](https://github.com/woodpecker-ci/woodpecker/releases/tag/v0.14.2) - 2021-10-19 * BUGFIXES - * Fix sanitziePath (#326) (aa4fa9aab3) + * Fix sanitizePath (#326) (aa4fa9aab3) * Fix json tag for `Pos` at struct `Line` (#422) (#424) * Fix channel buffer used with signal.Notify (#421) (#423) * ENHANCEMENTS @@ -261,7 +261,7 @@ * Add support to gitea remote for path-prefix condition (#235) * Enable go vet for ci (#230) * Enforce code format (#228) - * Add mutli-pipeline to Gitea (#225) + * Add multi-pipeline to Gitea (#225) * Move flag definitions into extra files (#215) * Remove unused code in server (#213) * Docs URL configuration (#206) diff --git a/charts/woodpecker-agent/values.yaml b/charts/woodpecker-agent/values.yaml index 731682597..36b19eece 100644 --- a/charts/woodpecker-agent/values.yaml +++ b/charts/woodpecker-agent/values.yaml @@ -85,7 +85,7 @@ tolerations: [] affinity: {} ## Using topology spread constraints, you can ensure that there is at least one agent -## pod for each topology zone, e.g. one per arch for for multi-architecture clusters +## pod for each topology zone, e.g. one per arch for multi-architecture clusters ## or one for each region for geographically distributed cloud-hosted clusters. ## Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ topologySpreadConstraints: [] diff --git a/cmd/server/flags.go b/cmd/server/flags.go index 7b951af81..e2f6ce183 100644 --- a/cmd/server/flags.go +++ b/cmd/server/flags.go @@ -240,7 +240,7 @@ var flags = []cli.Flag{ Usage: "set the cpus allowed to execute containers", }, // - // Github + // GitHub // &cli.BoolFlag{ EnvVars: []string{"WOODPECKER_GITHUB"}, diff --git a/cmd/server/server.go b/cmd/server/server.go index 724165156..ccb78f004 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -138,7 +138,7 @@ func run(c *cli.Context) error { } grpcServer := grpc.NewServer( grpc.StreamInterceptor(authorizer.streamInterceptor), - grpc.UnaryInterceptor(authorizer.unaryIntercaptor), + grpc.UnaryInterceptor(authorizer.unaryInterceptor), grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{ MinTime: c.Duration("keepalive-min-time"), }), @@ -337,7 +337,7 @@ func (a *authorizer) streamInterceptor(srv interface{}, stream grpc.ServerStream return handler(srv, stream) } -func (a *authorizer) unaryIntercaptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { +func (a *authorizer) unaryInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { if err := a.authorize(ctx); err != nil { return nil, err } diff --git a/cmd/server/setup.go b/cmd/server/setup.go index ae2ecda79..fd52a34b0 100644 --- a/cmd/server/setup.go +++ b/cmd/server/setup.go @@ -190,7 +190,7 @@ func setupMembershipService(_ *cli.Context, r forge.Forge) cache.MembershipServi func setupForge(c *cli.Context) (forge.Forge, error) { switch { case c.Bool("github"): - return setupGithub(c) + return setupGitHub(c) case c.Bool("gitlab"): return setupGitlab(c) case c.Bool("bitbucket"): @@ -276,7 +276,7 @@ func setupGitlab(c *cli.Context) (forge.Forge, error) { } // helper function to setup the GitHub forge from the CLI arguments. -func setupGithub(c *cli.Context) (forge.Forge, error) { +func setupGitHub(c *cli.Context) (forge.Forge, error) { opts := github.Opts{ URL: c.String("github-server"), Client: c.String("github-client"), diff --git a/docs/docs/30-administration/10-server-config.md b/docs/docs/30-administration/10-server-config.md index 806f791d4..4b7a86987 100644 --- a/docs/docs/30-administration/10-server-config.md +++ b/docs/docs/30-administration/10-server-config.md @@ -360,7 +360,7 @@ Specify a configuration service endpoint, see [Configuration Extension](./100-ex ### `WOODPECKER_GITHUB_...` -See [Github configuration](forges/github/#configuration) +See [GitHub configuration](forges/github/#configuration) ### `WOODPECKER_GOGS_...` diff --git a/docs/docs/30-administration/100-external-configuration-api.md b/docs/docs/30-administration/100-external-configuration-api.md index 15250bcfb..6a7a21b55 100644 --- a/docs/docs/30-administration/100-external-configuration-api.md +++ b/docs/docs/30-administration/100-external-configuration-api.md @@ -84,7 +84,7 @@ WOODPECKER_CONFIG_SERVICE_ENDPOINT=https://example.com/ciconfig "configs": [ { "name": ".woodpecker.yml", - "data": "pipeline:\n backend:\n image: alpine\n commands:\n - echo \"Hello there from Repo (.woodpecekr.yml)\"\n" + "data": "pipeline:\n backend:\n image: alpine\n commands:\n - echo \"Hello there from Repo (.woodpecker.yml)\"\n" } ] } diff --git a/docs/docs/91-migrations.md b/docs/docs/91-migrations.md index 9dc146cd4..f7df03af7 100644 --- a/docs/docs/91-migrations.md +++ b/docs/docs/91-migrations.md @@ -72,7 +72,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Plugin Settings moved into `settings` section: ```diff - pipline: + pipeline: something: image: my/plugin - setting1: foo diff --git a/docs/docs/92-awesome.md b/docs/docs/92-awesome.md index b04faf9d2..22eac52b5 100644 --- a/docs/docs/92-awesome.md +++ b/docs/docs/92-awesome.md @@ -9,7 +9,7 @@ If you have some missing resources, please feel free to [open a pull-request](ht - [Woodpecker CI pipeline configs](https://github.com/woodpecker-ci/woodpecker/tree/master/.woodpecker) - Complex setup containing different kind of pipelines - [Golang tests](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/test.yml) - [Typescript, eslint & Vue](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/web.yml) - - [Docusaurus & publishing to Github Pages](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docs.yml) + - [Docusaurus & publishing to GitHub Pages](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docs.yml) - [Docker container building](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docker.yml) - [Helm chart linting & releasing](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/helm.yml) diff --git a/docs/docs/92-development/01-getting-started.md b/docs/docs/92-development/01-getting-started.md index 7b9641e57..c6b0d60bc 100644 --- a/docs/docs/92-development/01-getting-started.md +++ b/docs/docs/92-development/01-getting-started.md @@ -47,7 +47,7 @@ A common config for debugging would look like this: WOODPECKER_OPEN=true WOODPECKER_ADMIN=your-username -# if you want to test webhooks with an online forge like Github this address needs to be accessible from public server +# if you want to test webhooks with an online forge like GitHub this address needs to be accessible from public server WOODPECKER_HOST=http://your-dev-address.com/ # github (sample for a forge config - see /docs/administration/forge/overview for other forges) @@ -75,7 +75,7 @@ WOODPECKER_HEALTHCHECK=false ### Setup O-Auth -Create an O-Auth app for your forge as describe in the [forges documentation](../30-administration/11-forges/10-overview.md). If you set `WOODPECKER_DEV_OAUTH_HOST=http://localhost:8000` you can use that address with the path as explained for the specific forge to login without the need for a public address. For example for Github you would use `http://localhost:8000/authorize` as authorization callback URL. +Create an O-Auth app for your forge as describe in the [forges documentation](../30-administration/11-forges/10-overview.md). If you set `WOODPECKER_DEV_OAUTH_HOST=http://localhost:8000` you can use that address with the path as explained for the specific forge to login without the need for a public address. For example for GitHub you would use `http://localhost:8000/authorize` as authorization callback URL. ## Developing with VS-Code diff --git a/docs/plugins/woodpecker-plugins/plugins.json b/docs/plugins/woodpecker-plugins/plugins.json index 4d7e79c64..7e13376b3 100644 --- a/docs/plugins/woodpecker-plugins/plugins.json +++ b/docs/plugins/woodpecker-plugins/plugins.json @@ -64,7 +64,7 @@ }, { "// todo": true, - "name": "Github release", + "name": "GitHub release", "docs": "https://raw.githubusercontent.com/woodpecker-ci/plugin-github-release/master/docs.md", "verified": true }, diff --git a/docs/versioned_docs/version-0.15/30-administration/10-server-config.md b/docs/versioned_docs/version-0.15/30-administration/10-server-config.md index 88ec50357..f3e491d96 100644 --- a/docs/versioned_docs/version-0.15/30-administration/10-server-config.md +++ b/docs/versioned_docs/version-0.15/30-administration/10-server-config.md @@ -290,7 +290,7 @@ Example: `WOODPECKER_LIMIT_CPU_SET=1,2` ### `WOODPECKER_GITHUB_...` -See [Github configuration](vcs/github/#configuration) +See [GitHub configuration](vcs/github/#configuration) ### `WOODPECKER_GOGS_...` diff --git a/docs/versioned_docs/version-0.15/30-administration/15-agent-config.md b/docs/versioned_docs/version-0.15/30-administration/15-agent-config.md index f3e4ac768..9bda5e397 100644 --- a/docs/versioned_docs/version-0.15/30-administration/15-agent-config.md +++ b/docs/versioned_docs/version-0.15/30-administration/15-agent-config.md @@ -1,6 +1,6 @@ # Agent configuration -Agents are configured by the command line or environement variables. At the minimum you need the following information: +Agents are configured by the command line or environment variables. At the minimum you need the following information: ```yaml # docker-compose.yml @@ -22,7 +22,7 @@ The following are automatically set and can be overridden: ## Processes per agent -By default the maximum processes that are run per agent is 1. If required you can add `WOODPECKER_MAX_PROCS` to increase your parellel processing on a per-agent basis. +By default the maximum processes that are run per agent is 1. If required you can add `WOODPECKER_MAX_PROCS` to increase your parallel processing on a per-agent basis. ```yaml # docker-compose.yml diff --git a/docs/versioned_docs/version-0.15/91-migrations.md b/docs/versioned_docs/version-0.15/91-migrations.md index cad9436b0..8c4ca1785 100644 --- a/docs/versioned_docs/version-0.15/91-migrations.md +++ b/docs/versioned_docs/version-0.15/91-migrations.md @@ -55,7 +55,7 @@ Some versions need some changes to the server configuration or the pipeline conf - Plugin Settings moved into `settings` section: ```diff - pipline: + pipeline: something: image: my/plugin - setting1: foo diff --git a/docs/versioned_docs/version-0.15/92-awesome.md b/docs/versioned_docs/version-0.15/92-awesome.md index bf9aad38e..c3858f990 100644 --- a/docs/versioned_docs/version-0.15/92-awesome.md +++ b/docs/versioned_docs/version-0.15/92-awesome.md @@ -9,7 +9,7 @@ If you have some missing resources, please feel free to [open a pull-request](ht - [Woodpecker CI pipeline configs](https://github.com/woodpecker-ci/woodpecker/tree/master/.woodpecker) - Complex setup containing different kind of pipelines - [Golang tests](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/test.yml) - [Typescript, eslint & Vue](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/web.yml) - - [Docusaurus & publishing to Github Pages](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docs.yml) + - [Docusaurus & publishing to GitHub Pages](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docs.yml) - [Docker container building](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/docker.yml) - [Helm chart linting & releasing](https://github.com/woodpecker-ci/woodpecker/blob/master/.woodpecker/helm.yml) diff --git a/docs/versioned_docs/version-0.15/92-development/01-getting-started.md b/docs/versioned_docs/version-0.15/92-development/01-getting-started.md index f88b9411e..61a5f94e7 100644 --- a/docs/versioned_docs/version-0.15/92-development/01-getting-started.md +++ b/docs/versioned_docs/version-0.15/92-development/01-getting-started.md @@ -31,7 +31,7 @@ A common config for debugging would look like this: WOODPECKER_OPEN=true WOODPECKER_ADMIN=your-username -# if you want to test webhooks with an online SCM like Github this address needs to be accessible from public server +# if you want to test webhooks with an online SCM like GitHub this address needs to be accessible from public server WOODPECKER_HOST=http://your-dev-address.com/ # github (sample for a SCM config - see /docs/administration/vcs/overview for other SCMs) @@ -59,7 +59,7 @@ WOODPECKER_HEALTHCHECK=false ### Setup O-Auth -Create an O-Auth app for your SCM as describe in the [SCM documentation](../30-administration/11-vcs/10-overview.md). If you set `WOODPECKER_DEV_OAUTH_HOST=http://localhost:8000` you can use that address with the path as explained for the specific SCM to login without the need for a public address. For example for Github you would use `http://localhost:8000/authorize` as authorization callback URL. +Create an O-Auth app for your SCM as describe in the [SCM documentation](../30-administration/11-vcs/10-overview.md). If you set `WOODPECKER_DEV_OAUTH_HOST=http://localhost:8000` you can use that address with the path as explained for the specific SCM to login without the need for a public address. For example for GitHub you would use `http://localhost:8000/authorize` as authorization callback URL. ## Developing with VS-Code diff --git a/pipeline/backend/local/local.go b/pipeline/backend/local/local.go index 7d20e5a48..e75de3066 100644 --- a/pipeline/backend/local/local.go +++ b/pipeline/backend/local/local.go @@ -40,7 +40,7 @@ var notAllowedEnvVarOverwrites = []string{ } type local struct { - // TODO: make cmd a cmd list to itterate over, the hard part is to have a common ReadCloser + // TODO: make cmd a cmd list to iterate over, the hard part is to have a common ReadCloser cmd *exec.Cmd output io.ReadCloser workingdir string diff --git a/server/api/pipeline.go b/server/api/pipeline.go index 00d717ded..af01f8b60 100644 --- a/server/api/pipeline.go +++ b/server/api/pipeline.go @@ -354,7 +354,7 @@ func PostPipeline(c *gin.Context) { return } - // refresh the token to make sure, pipeline.ReStart can still obtain the pipeline config if nessessary again + // refresh the token to make sure, pipeline.ReStart can still obtain the pipeline config if necessary again refreshUserToken(c, user) // make Deploy overridable diff --git a/server/api/stream.go b/server/api/stream.go index 68815ae86..409b16da7 100644 --- a/server/api/stream.go +++ b/server/api/stream.go @@ -142,7 +142,7 @@ func LogStreamSSE(c *gin.Context) { _store := store.FromContext(c) // // parse the pipeline number and step sequence number from - // // the repquest parameter. + // // the request parameter. pipelinen, _ := strconv.ParseInt(c.Param("pipeline"), 10, 64) stepn, _ := strconv.Atoi(c.Param("number")) diff --git a/server/cron/cron.go b/server/cron/cron.go index b85f6d324..b02a01d24 100644 --- a/server/cron/cron.go +++ b/server/cron/cron.go @@ -49,7 +49,7 @@ func Start(ctx context.Context, store store.Store, forge forge.Forge) error { crons, err := store.CronListNextExecute(now.Unix(), checkItems) if err != nil { - log.Error().Err(err).Int64("now", now.Unix()).Msg("obtain cron cron list") + log.Error().Err(err).Int64("now", now.Unix()).Msg("obtain cron list") return } diff --git a/server/forge/bitbucket/bitbucket.go b/server/forge/bitbucket/bitbucket.go index 6768500c8..a74305be8 100644 --- a/server/forge/bitbucket/bitbucket.go +++ b/server/forge/bitbucket/bitbucket.go @@ -256,7 +256,7 @@ func (c *config) Activate(ctx context.Context, u *model.User, r *model.Repo, lin }) } -// Deactivate deactives the repository be removing repository push hooks from +// Deactivate deactivates the repository be removing repository push hooks from // the Bitbucket repository. func (c *config) Deactivate(ctx context.Context, u *model.User, r *model.Repo, link string) error { client := c.newClient(ctx, u) @@ -296,7 +296,7 @@ func (c *config) Branches(ctx context.Context, u *model.User, r *model.Repo) ([] return branches, nil } -// BranchHead returns the sha of the head (lastest commit) of the specified branch +// BranchHead returns the sha of the head (latest commit) of the specified branch func (c *config) BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) { // TODO(1138): missing implementation return "", forge_types.ErrNotImplemented diff --git a/server/forge/bitbucket/internal/types.go b/server/forge/bitbucket/internal/types.go index 1b3ba5b39..930683a9e 100644 --- a/server/forge/bitbucket/internal/types.go +++ b/server/forge/bitbucket/internal/types.go @@ -158,7 +158,7 @@ type PullRequestHook struct { Updated time.Time `json:"updated_on"` Source struct { - Repo Repo `json:"repsoitory"` + Repo Repo `json:"repository"` Commit struct { Hash string `json:"hash"` Links Links `json:"links"` @@ -169,7 +169,7 @@ type PullRequestHook struct { } `json:"source"` Dest struct { - Repo Repo `json:"repsoitory"` + Repo Repo `json:"repository"` Commit struct { Hash string `json:"hash"` Links Links `json:"links"` diff --git a/server/forge/bitbucketserver/bitbucketserver.go b/server/forge/bitbucketserver/bitbucketserver.go index 124747243..0d57bf615 100644 --- a/server/forge/bitbucketserver/bitbucketserver.go +++ b/server/forge/bitbucketserver/bitbucketserver.go @@ -238,7 +238,7 @@ func (c *Config) Branches(ctx context.Context, u *model.User, r *model.Repo) ([] return branches, nil } -// BranchHead returns the sha of the head (lastest commit) of the specified branch +// BranchHead returns the sha of the head (latest commit) of the specified branch func (c *Config) BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) { // TODO(1138): missing implementation return "", forge_types.ErrNotImplemented diff --git a/server/forge/coding/coding.go b/server/forge/coding/coding.go index b6c0b7176..e255a7379 100644 --- a/server/forge/coding/coding.go +++ b/server/forge/coding/coding.go @@ -134,7 +134,7 @@ func (c *Coding) Auth(ctx context.Context, token, secret string) (string, error) // Refresh refreshes an oauth token and expiration for the given // user. It returns true if the token was refreshed, false if the -// token was not refreshed, and error if it failed to refersh. +// token was not refreshed, and error if it failed to refresh. func (c *Coding) Refresh(ctx context.Context, u *model.User) (bool, error) { config := c.newConfig("") source := config.TokenSource(c.newContext(ctx), &oauth2.Token{RefreshToken: u.Secret}) @@ -295,7 +295,7 @@ func (c *Coding) Branches(ctx context.Context, u *model.User, r *model.Repo) ([] return []string{r.Branch}, nil } -// BranchHead returns the sha of the head (lastest commit) of the specified branch +// BranchHead returns the sha of the head (latest commit) of the specified branch func (c *Coding) BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) { // TODO(1138): missing implementation return "", forge_types.ErrNotImplemented diff --git a/server/forge/coding/coding_test.go b/server/forge/coding/coding_test.go index c63966575..faa1167e1 100644 --- a/server/forge/coding/coding_test.go +++ b/server/forge/coding/coding_test.go @@ -82,7 +82,7 @@ func Test_coding(t *testing.T) { }) g.Describe("Given an access token", func() { - g.It("Should return the anthenticated user", func() { + g.It("Should return the authenticated user", func() { login, err := c.Auth(ctx, fakeUser.Token, fakeUser.Secret) g.Assert(err).IsNil() g.Assert(login).Equal(fakeUser.Login) diff --git a/server/forge/coding/hook.go b/server/forge/coding/hook.go index ed03196cf..c534d1adf 100644 --- a/server/forge/coding/hook.go +++ b/server/forge/coding/hook.go @@ -107,7 +107,7 @@ func parseHook(r *http.Request) (*model.Repo, *model.Pipeline, error) { case hookPR: return parsePullRequestHook(raw) case hookMR: - return parseMergeReuqestHook(raw) + return parseMergeRequestHook(raw) } return nil, nil, nil } @@ -213,7 +213,7 @@ func parsePullRequestHook(raw []byte) (*model.Repo, *model.Pipeline, error) { return repo, pipeline, nil } -func parseMergeReuqestHook(raw []byte) (*model.Repo, *model.Pipeline, error) { +func parseMergeRequestHook(raw []byte) (*model.Repo, *model.Pipeline, error) { hook := &MergeRequestHook{} err := json.Unmarshal(raw, hook) if err != nil { diff --git a/server/forge/coding/hook_test.go b/server/forge/coding/hook_test.go index 6e9302b69..b78a931b2 100644 --- a/server/forge/coding/hook_test.go +++ b/server/forge/coding/hook_test.go @@ -196,7 +196,7 @@ func Test_hook(t *testing.T) { Refspec: "branch1:master", } - actualRepo, actualPipeline, err := parseMergeReuqestHook([]byte(fixtures.MergeRequestHook)) + actualRepo, actualPipeline, err := parseMergeRequestHook([]byte(fixtures.MergeRequestHook)) g.Assert(err).IsNil() g.Assert(actualRepo).Equal(repo) g.Assert(actualPipeline).Equal(pipeline) diff --git a/server/forge/coding/internal/webhook.go b/server/forge/coding/internal/webhook.go index 870ed04ae..fd6f9d892 100644 --- a/server/forge/coding/internal/webhook.go +++ b/server/forge/coding/internal/webhook.go @@ -49,7 +49,7 @@ func (c *Client) AddWebhook(globalKey, projectName, link string) error { u := fmt.Sprintf("/user/%s/project/%s/git/hook/%d", globalKey, projectName, webhook.ID) params := url.Values{} params.Set("hook_url", link) - params.Set("type_pust", "true") + params.Set("type_push", "true") params.Set("type_mr_pr", "true") _, err := c.Do("PUT", u, params) diff --git a/server/forge/gitea/gitea.go b/server/forge/gitea/gitea.go index 31a9d3be1..648d431e6 100644 --- a/server/forge/gitea/gitea.go +++ b/server/forge/gitea/gitea.go @@ -406,7 +406,7 @@ func (c *Gitea) Activate(ctx context.Context, u *model.User, r *model.Repo, link return nil } -// Deactivate deactives the repository be removing repository push hooks from +// Deactivate deactivates the repository be removing repository push hooks from // the Gitea repository. func (c *Gitea) Deactivate(ctx context.Context, u *model.User, r *model.Repo, link string) error { client, err := c.newClientToken(ctx, u.Token) @@ -455,7 +455,7 @@ func (c *Gitea) Branches(ctx context.Context, u *model.User, r *model.Repo) ([]s return branches, nil } -// BranchHead returns the sha of the head (lastest commit) of the specified branch +// BranchHead returns the sha of the head (latest commit) of the specified branch func (c *Gitea) BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) { token := "" if u != nil { diff --git a/server/forge/github/fixtures/hooks.go b/server/forge/github/fixtures/hooks.go index be0bfaff8..c17938da6 100644 --- a/server/forge/github/fixtures/hooks.go +++ b/server/forge/github/fixtures/hooks.go @@ -294,7 +294,7 @@ const HookPullRequest = ` ` // HookPullRequestInvalidAction is a sample hook pull request that has an -// action not equal to synchrize or opened, and is expected to be ignored. +// action not equal to synchronize or opened, and is expected to be ignored. const HookPullRequestInvalidAction = ` { "action": "reopened", diff --git a/server/forge/github/github.go b/server/forge/github/github.go index 1ddcdfb2b..9b4e8a59b 100644 --- a/server/forge/github/github.go +++ b/server/forge/github/github.go @@ -304,7 +304,7 @@ func (c *client) Netrc(u *model.User, r *model.Repo) (*model.Netrc, error) { }, nil } -// Deactivate deactives the repository be removing registered push hooks from +// Deactivate deactivates the repository be removing registered push hooks from // the GitHub repository. func (c *client) Deactivate(ctx context.Context, u *model.User, r *model.Repo, link string) error { client := c.newClientToken(ctx, u.Token) @@ -508,7 +508,7 @@ func (c *client) Branches(ctx context.Context, u *model.User, r *model.Repo) ([] return branches, nil } -// BranchHead returns the sha of the head (lastest commit) of the specified branch +// BranchHead returns the sha of the head (latest commit) of the specified branch func (c *client) BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) { token := "" if u != nil { diff --git a/server/forge/github/github_test.go b/server/forge/github/github_test.go index e0a030b86..9e02c9107 100644 --- a/server/forge/github/github_test.go +++ b/server/forge/github/github_test.go @@ -112,7 +112,7 @@ func Test_github(t *testing.T) { g.It("Should return a user team list") - g.It("Should register repositroy hooks") + g.It("Should register repository hooks") g.It("Should return a repository file") diff --git a/server/forge/github/parse_test.go b/server/forge/github/parse_test.go index ce30655f3..1988dd3ee 100644 --- a/server/forge/github/parse_test.go +++ b/server/forge/github/parse_test.go @@ -28,7 +28,7 @@ import ( ) const ( - hookEvent = "X-Github-Event" + hookEvent = "X-GitHub-Event" hookDeploy = "deployment" hookPush = "push" hookPull = "pull_request" diff --git a/server/forge/gitlab/gitlab.go b/server/forge/gitlab/gitlab.go index 5245727ec..8db2eb529 100644 --- a/server/forge/gitlab/gitlab.go +++ b/server/forge/gitlab/gitlab.go @@ -560,7 +560,7 @@ func (g *Gitlab) Branches(ctx context.Context, user *model.User, repo *model.Rep return branches, nil } -// BranchHead returns the sha of the head (lastest commit) of the specified branch +// BranchHead returns the sha of the head (latest commit) of the specified branch func (g *Gitlab) BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) { token := "" if u != nil { diff --git a/server/forge/gitlab/testdata/projects.go b/server/forge/gitlab/testdata/projects.go index 2ff7d00b7..482ae9e5b 100644 --- a/server/forge/gitlab/testdata/projects.go +++ b/server/forge/gitlab/testdata/projects.go @@ -133,7 +133,7 @@ var notArchivedProjectsPayload = []byte(` ] `) -var project4Paylod = []byte(` +var project4Payload = []byte(` { "id": 4, "description": null, @@ -182,7 +182,7 @@ var project4Paylod = []byte(` } `) -var project6Paylod = []byte(` +var project6Payload = []byte(` { "id": 6, "description": null, diff --git a/server/forge/gitlab/testdata/testdata.go b/server/forge/gitlab/testdata/testdata.go index f07583af6..6f1c58c4a 100644 --- a/server/forge/gitlab/testdata/testdata.go +++ b/server/forge/gitlab/testdata/testdata.go @@ -43,10 +43,10 @@ func NewServer(t *testing.T) *httptest.Server { return case "/api/v4/projects/diaspora/diaspora-client": - w.Write(project4Paylod) + w.Write(project4Payload) return case "/api/v4/projects/brightbox/puppet": - w.Write(project6Paylod) + w.Write(project6Payload) return case "/api/v4/projects/4/hooks": switch r.Method { diff --git a/server/forge/gogs/gogs_test.go b/server/forge/gogs/gogs_test.go index 40dd3d55f..05ca5ee9d 100644 --- a/server/forge/gogs/gogs_test.go +++ b/server/forge/gogs/gogs_test.go @@ -130,7 +130,7 @@ func Test_gogs(t *testing.T) { }) }) - g.It("Should register repositroy hooks", func() { + g.It("Should register repository hooks", func() { err := c.Activate(ctx, fakeUser, fakeRepo, "http://localhost") g.Assert(err).IsNil() }) @@ -160,7 +160,7 @@ func Test_gogs(t *testing.T) { g.It("Should handle a parsing error") }) - g.It("Should return no-op for usupporeted features", func() { + g.It("Should return no-op for unsupported features", func() { _, err1 := c.Auth(ctx, "octocat", "4vyW6b49Z") err2 := c.Status(ctx, nil, nil, nil, nil) err3 := c.Deactivate(ctx, nil, nil, "") diff --git a/server/forge/remote.go b/server/forge/remote.go index e9d27b9a4..d0f31a49a 100644 --- a/server/forge/remote.go +++ b/server/forge/remote.go @@ -80,7 +80,7 @@ type Forge interface { // TODO: Add proper pagination handling and remove workaround in gitea forge Branches(ctx context.Context, u *model.User, r *model.Repo) ([]string, error) - // BranchHead returns the sha of the head (lastest commit) of the specified branch + // BranchHead returns the sha of the head (latest commit) of the specified branch BranchHead(ctx context.Context, u *model.User, r *model.Repo, branch string) (string, error) // Hook parses the post-commit hook from the Request body and returns the @@ -94,7 +94,7 @@ type Forge interface { // Refresher refreshes an oauth token and expiration for the given user. It // returns true if the token was refreshed, false if the token was not refreshed, -// and error if it failed to refersh. +// and error if it failed to refresh. type Refresher interface { Refresh(context.Context, *model.User) (bool, error) } diff --git a/server/logging/log.go b/server/logging/log.go index 1b15a5ff7..228c43e73 100644 --- a/server/logging/log.go +++ b/server/logging/log.go @@ -11,7 +11,7 @@ import ( // the stream. This should be resolved. // TODO (bradrydzewski) implement a mux.Info to fetch information and -// statistics for the multiplexier. Streams, subscribers, etc +// statistics for the multiplexer. Streams, subscribers, etc // mux.Info() // TODO (bradrydzewski) refactor code to place publisher and subscriber diff --git a/server/model/step.go b/server/model/step.go index 96894a8bc..fe4e68d36 100644 --- a/server/model/step.go +++ b/server/model/step.go @@ -97,7 +97,7 @@ func Tree(steps []*Step) ([]*Step, error) { } } - // assign children to parrents + // assign children to parents for i := range steps { if !steps[i].IsParent() { parent, err := findNode(nodes, steps[i].PPID) diff --git a/server/pubsub/pubsub.go b/server/pubsub/pubsub.go index 24f5221b2..6dbcf09d5 100644 --- a/server/pubsub/pubsub.go +++ b/server/pubsub/pubsub.go @@ -17,7 +17,7 @@ type Message struct { // Data is the actual data in the entry. Data []byte `json:"data"` - // Labels represents the key-value pairs the entry is lebeled with. + // Labels represents the key-value pairs the entry is labeled with. Labels map[string]string `json:"labels,omitempty"` } diff --git a/server/store/datastore/migration/000_legacy_to_xorm.go b/server/store/datastore/migration/000_legacy_to_xorm.go index 0f78f8ccf..498c62e27 100644 --- a/server/store/datastore/migration/000_legacy_to_xorm.go +++ b/server/store/datastore/migration/000_legacy_to_xorm.go @@ -96,7 +96,7 @@ var legacy2Xorm = task{ return err } if _, err := sess.Exec("INSERT INTO build_config (config_id, build_id) SELECT config_id,build_id FROM old_build_config;"); err != nil { - return fmt.Errorf("unable to set copy data in to temp table %s. Error: %v", "old_build_config", err) + return fmt.Errorf("unable to set copy data into temp table %s. Error: %v", "old_build_config", err) } if err := sess.DropTable("old_build_config"); err != nil { return fmt.Errorf("could not drop table '%s': %v", "old_build_config", err) diff --git a/server/store/store.go b/server/store/store.go index 1b545071e..4908a9028 100644 --- a/server/store/store.go +++ b/server/store/store.go @@ -130,7 +130,7 @@ type Store interface { GlobalSecretFind(string) (*model.Secret, error) GlobalSecretList() ([]*model.Secret, error) - // Registrys + // Registries RegistryFind(*model.Repo, string) (*model.Registry, error) RegistryList(*model.Repo) ([]*model.Registry, error) RegistryCreate(*model.Registry) error @@ -148,7 +148,7 @@ type Store interface { // Logs LogFind(*model.Step) (io.ReadCloser, error) - // TODO: since we do ReadAll in any case a ioReader is not the best idear + // TODO: since we do ReadAll in any case a ioReader is not the best idea // so either find a way to write log in chunks by xorm ... LogSave(*model.Step, io.Reader) error diff --git a/server/swagger/files/swagger.yml b/server/swagger/files/swagger.yml index d1d24960d..d5a60214b 100644 --- a/server/swagger/files/swagger.yml +++ b/server/swagger/files/swagger.yml @@ -147,7 +147,7 @@ paths: Unable to activate the Repository because it is already activate 500: description: | - Unable to activate the Repository due to an internal server error. This may indicate a problem adding hooks to the remote system (ie Github), generating SSH deployment keys, or persisting to the database. + Unable to activate the Repository due to an internal server error. This may indicate a problem adding hooks to the remote system (ie GitHub), generating SSH deployment keys, or persisting to the database. delete: parameters: @@ -198,7 +198,7 @@ paths: tags: - Repos summary: Encrypt repo secrets - description: Encryptes a Yaml file with secret environment variables for secure public storage. + description: Encrypts a Yaml file with secret environment variables for secure public storage. security: - accessToken: [] responses: diff --git a/shared/constant/constant.go b/shared/constant/constant.go index f2bc6637f..0e0226a67 100644 --- a/shared/constant/constant.go +++ b/shared/constant/constant.go @@ -22,7 +22,7 @@ var PrivilegedPlugins = []string{ "woodpeckerci/plugin-docker-buildx", } -// DefaultConfigOrder represent the priority in witch woodpecker serarch for a pipeline config by default +// DefaultConfigOrder represent the priority in witch woodpecker search for a pipeline config by default // folders are indicated by supplying a trailing / var DefaultConfigOrder = [...]string{ ".woodpecker/", diff --git a/shared/utils/context.go b/shared/utils/context.go index 66cc6687d..2a4cc2132 100644 --- a/shared/utils/context.go +++ b/shared/utils/context.go @@ -26,13 +26,13 @@ import ( func WithContextSigtermCallback(ctx context.Context, f func()) context.Context { ctx, cancel := context.WithCancel(ctx) go func() { - recivedSignal := make(chan os.Signal, 1) - signal.Notify(recivedSignal, syscall.SIGINT, syscall.SIGTERM) - defer signal.Stop(recivedSignal) + receivedSignal := make(chan os.Signal, 1) + signal.Notify(receivedSignal, syscall.SIGINT, syscall.SIGTERM) + defer signal.Stop(receivedSignal) select { case <-ctx.Done(): - case <-recivedSignal: + case <-receivedSignal: cancel() if f != nil { f() diff --git a/web/src/compositions/useTabs.ts b/web/src/compositions/useTabs.ts index 8dec7940a..0e453e2af 100644 --- a/web/src/compositions/useTabs.ts +++ b/web/src/compositions/useTabs.ts @@ -57,7 +57,7 @@ export function useTabsClient() { const activeTab = inject>('active-tab'); if (activeTab === undefined || tabs === undefined || disableHashMode === undefined) { - throw new Error('Please use this "useTabsClient" composition inside a compoent running "useTabsProvider".'); + throw new Error('Please use this "useTabsClient" composition inside a component running "useTabsProvider".'); } return { activeTab, tabs, disableHashMode }; diff --git a/web/src/store/pipelines.ts b/web/src/store/pipelines.ts index ff59726d7..8df59cd17 100644 --- a/web/src/store/pipelines.ts +++ b/web/src/store/pipelines.ts @@ -92,8 +92,8 @@ export default defineStore({ this.setPipeline(owner, repo, pipelines); }, async loadPipelineFeed() { - const pipeliness = await apiClient.getPipelineFeed(); - this.pipelineFeed = pipeliness; + const pipelines = await apiClient.getPipelineFeed(); + this.pipelineFeed = pipelines; }, }, });