Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix various typos #416

Merged
merged 8 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cli/internal/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ func NewClient(c *cli.Context) (woodpecker.Client, error) {
}

config := new(oauth2.Config)
auther := config.Client(
client := config.Client(
oauth2.NoContext,
&oauth2.Token{
AccessToken: token,
},
)

trans, _ := auther.Transport.(*oauth2.Transport)
trans, _ := client.Transport.(*oauth2.Transport)

if len(socks) != 0 && !socksoff {
dialer, err := proxy.SOCKS5("tcp", socks, nil, proxy.Direct)
Expand All @@ -68,7 +68,7 @@ func NewClient(c *cli.Context) (woodpecker.Client, error) {
}
}

return woodpecker.NewClient(server, auther), nil
return woodpecker.NewClient(server, client), nil
}

// ParseRepo parses the repository owner and name from a string.
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/10-intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pipeline:
- cat myfile
```

## Plugins are straighforward
## Plugins are straightforward

- If you copy the same shell script from project to project
- Pack it into a plugin instead
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/30-administration/20-vcs/60-bitbucket_server.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ This stores the private RSA certificate in `key.pem`. The next command generates
openssl rsa -in /etc/bitbucket/key.pem -pubout >> /etc/bitbucket/key.pub
```

Please note that the private key file can be mounted into your Woodpecker conatiner at runtime or as an environment variable
Please note that the private key file can be mounted into your Woodpecker container at runtime or as an environment variable
luzpaz marked this conversation as resolved.
Show resolved Hide resolved

Private key file mounted into your Woodpecker container at runtime as a volume.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/90-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Apart from Woodpecker staying free and OpenSource forever, the growing community
- [More features are already in the pipeline :wink:](https://github.com/woodpecker-ci/woodpecker/pulls) ...
## Why is Woodpecker a fork of Drone version 0.8?

The Drone CI license was changed after the 0.8 release from Apache 2 to a proprietary license. Woodpecker is based on this lastest freely available version.
The Drone CI license was changed after the 0.8 release from Apache 2 to a proprietary license. Woodpecker is based on this latest freely available version.
6 changes: 3 additions & 3 deletions pipeline/frontend/yaml/compiler/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func WithOption(option Option, b bool) Option {
}
}

// WithVolumes configutes the compiler with default volumes that
// WithVolumes configures the compiler with default volumes that
// are mounted to each container in the pipeline.
func WithVolumes(volumes ...string) Option {
return func(compiler *Compiler) {
Expand All @@ -49,7 +49,7 @@ func WithSecret(secrets ...Secret) Option {
}
}

// WithMetadata configutes the compiler with the repostiory, build
// WithMetadata configures the compiler with the repository, build
// and system metadata. The metadata is used to remove steps from
// the compiled pipeline configuration that should be skipped. The
// metadata is also added to each container as environment variables.
Expand Down Expand Up @@ -189,7 +189,7 @@ func WithProxy() Option {
)
}

// WithNetworks configures the compiler with additionnal networks
// WithNetworks configures the compiler with additional networks
// to be connected to build containers
func WithNetworks(networks ...string) Option {
return func(compiler *Compiler) {
Expand Down
2 changes: 1 addition & 1 deletion pipeline/frontend/yaml/matrix/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func calc(matrix Matrix) []Axis {
// structure to hold the transformed result set
var axisList []Axis

// for each axis calculate the uniqe set of values that should be used.
// for each axis calculate the unique set of values that should be used.
for p := 0; p < perm; p++ {
axis := map[string]string{}
decr := perm
Expand Down
2 changes: 1 addition & 1 deletion pipeline/rpc/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"github.com/woodpecker-ci/woodpecker/pipeline/backend"
)

// ErrCancelled signals the pipeine is cancelled.
// ErrCancelled signals the pipeline is cancelled.
// var ErrCancelled = errors.New("cancelled")

type (
Expand Down
2 changes: 1 addition & 1 deletion pipeline/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func (f TraceFunc) Trace(state *State) error {
return f(state)
}

// DefaultTracer provides a tracer that updates the CI_ enviornment
// DefaultTracer provides a tracer that updates the CI_ environment
// variables to include the correct timestamp and status.
// TODO(bradrydzewski) find either a new home or better name for this.
var DefaultTracer = TraceFunc(func(state *State) error {
Expand Down
10 changes: 5 additions & 5 deletions server/logging/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type stream struct {
sync.Mutex

path string
hist []*Entry
list []*Entry
subs map[*subscriber]struct{}
done chan struct{}
wait sync.WaitGroup
Expand Down Expand Up @@ -69,7 +69,7 @@ func (l *log) Write(c context.Context, path string, entry *Entry) error {
return ErrNotFound
}
s.Lock()
s.hist = append(s.hist, entry)
s.list = append(s.list, entry)
for sub := range s.subs {
go sub.handler(entry)
}
Expand All @@ -89,8 +89,8 @@ func (l *log) Tail(c context.Context, path string, handler Handler) error {
handler: handler,
}
s.Lock()
if len(s.hist) != 0 {
sub.handler(s.hist...)
if len(s.list) != 0 {
sub.handler(s.list...)
}
s.subs[sub] = struct{}{}
s.Unlock()
Expand Down Expand Up @@ -132,7 +132,7 @@ func (l *log) Snapshot(c context.Context, path string, w io.Writer) error {
return ErrNotFound
}
s.Lock()
for _, entry := range s.hist {
for _, entry := range s.list {
w.Write(entry.Data)
w.Write(cr)
}
Expand Down
6 changes: 3 additions & 3 deletions server/pubsub/topic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func TestTopicSubscribe(t *testing.T) {
top := newTopic("foo")
top.subscribe(sub)
if _, ok := top.subs[sub]; !ok {
t.Errorf("Exepect subscription registered with topic on subscribe")
t.Errorf("Expect subscription registered with topic on subscribe")
}
}

Expand All @@ -19,11 +19,11 @@ func TestTopicUnsubscribe(t *testing.T) {
top := newTopic("foo")
top.subscribe(sub)
if _, ok := top.subs[sub]; !ok {
t.Errorf("Exepect subscription registered with topic on subscribe")
t.Errorf("Expect subscription registered with topic on subscribe")
}
top.unsubscribe(sub)
if _, ok := top.subs[sub]; ok {
t.Errorf("Exepect subscription de-registered with topic on unsubscribe")
t.Errorf("Expect subscription de-registered with topic on unsubscribe")
}
}

Expand Down
2 changes: 1 addition & 1 deletion server/remote/gitlab/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func convertMergeRequestHock(hook *gitlab.MergeEvent, req *http.Request) (*model
} else if target == nil {
return nil, nil, fmt.Errorf("target key expected in merge request hook")
} else if source == nil {
return nil, nil, fmt.Errorf("source key exptected in merge request hook")
return nil, nil, fmt.Errorf("source key expected in merge request hook")
}

if target.PathWithNamespace != "" {
Expand Down
4 changes: 2 additions & 2 deletions server/remote/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (g *Gitlab) Teams(ctx context.Context, user *model.User) ([]*model.Team, er
batch, _, err := client.Groups.ListGroups(&gitlab.ListGroupsOptions{
ListOptions: gitlab.ListOptions{Page: i, PerPage: perPage},
AllAvailable: gitlab.Bool(false),
MinAccessLevel: gitlab.AccessLevel(gitlab.DeveloperPermissions), // TODO: check whats best here
MinAccessLevel: gitlab.AccessLevel(gitlab.DeveloperPermissions), // TODO: check what's best here
}, gitlab.WithContext(ctx))
if err != nil {
return nil, err
Expand Down Expand Up @@ -232,7 +232,7 @@ func (g *Gitlab) Repos(ctx context.Context, user *model.User) ([]*model.Repo, er
repos := make([]*model.Repo, 0, perPage)
opts := &gitlab.ListProjectsOptions{
ListOptions: gitlab.ListOptions{PerPage: perPage},
MinAccessLevel: gitlab.AccessLevel(gitlab.DeveloperPermissions), // TODO: check whats best here
MinAccessLevel: gitlab.AccessLevel(gitlab.DeveloperPermissions), // TODO: check what's best here
}
if g.HideArchives {
opts.Archived = gitlab.Bool(false)
Expand Down
2 changes: 1 addition & 1 deletion server/remote/gitlab/gitlab_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func Test_Gitlab(t *testing.T) {
// Test hook method
g.Describe("Hook", func() {
g.Describe("Push hook", func() {
g.It("Should parse actual push hoook", func() {
g.It("Should parse actual push hook", func() {
req, _ := http.NewRequest(
testdata.ServiceHookMethod,
testdata.ServiceHookURL.String(),
Expand Down
22 changes: 11 additions & 11 deletions server/remote/gitlab/testdata/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var ServiceHookPushBody = []byte(`{
"checkout_sha": "16862e368d8ab812e48833b741dad720d6e2cb7f",
"message": null,
"user_id": 2,
"user_name": "te st",
"user_name": "the test",
"user_username": "test",
"user_email": "",
"user_avatar": "https://www.gravatar.com/avatar/dd46a756faad4727fb679320751f6dea?s=80&d=identicon",
Expand All @@ -54,7 +54,7 @@ var ServiceHookPushBody = []byte(`{
"avatar_url": "http://example.com/uploads/project/avatar/555/Outh-20-Logo.jpg",
"git_ssh_url": "git@10.40.8.5:test/woodpecker.git",
"git_http_url": "http://10.40.8.5:3200/test/woodpecker.git",
"namespace": "te st",
"namespace": "the test",
"visibility_level": 20,
"path_with_namespace": "test/woodpecker",
"default_branch": "develop",
Expand All @@ -72,7 +72,7 @@ var ServiceHookPushBody = []byte(`{
"timestamp": "2021-09-27T04:46:14+00:00",
"url": "http://10.40.8.5:3200/test/woodpecker/-/commit/16862e368d8ab812e48833b741dad720d6e2cb7f",
"author": {
"name": "te st",
"name": "the test",
"email": "test@test.test"
},
"added": [
Expand Down Expand Up @@ -110,7 +110,7 @@ var ServiceHookTagPushBody = []byte(`{
"checkout_sha": "16862e368d8ab812e48833b741dad720d6e2cb7f",
"message": "hi",
"user_id": 2,
"user_name": "te st",
"user_name": "the test",
"user_username": "test",
"user_email": "",
"user_avatar": "https://www.gravatar.com/avatar/dd46a756faad4727fb679320751f6dea?s=80&d=identicon",
Expand All @@ -123,7 +123,7 @@ var ServiceHookTagPushBody = []byte(`{
"avatar_url": "http://example.com/uploads/project/avatar/555/Outh-20-Logo.jpg",
"git_ssh_url": "git@10.40.8.5:test/woodpecker.git",
"git_http_url": "http://10.40.8.5:3200/test/woodpecker.git",
"namespace": "te st",
"namespace": "the test",
"visibility_level": 20,
"path_with_namespace": "test/woodpecker",
"default_branch": "develop",
Expand All @@ -141,7 +141,7 @@ var ServiceHookTagPushBody = []byte(`{
"timestamp": "2021-09-27T04:46:14+00:00",
"url": "http://10.40.8.5:3200/test/woodpecker/-/commit/16862e368d8ab812e48833b741dad720d6e2cb7f",
"author": {
"name": "te st",
"name": "the test",
"email": "test@test.test"
},
"added": [
Expand Down Expand Up @@ -175,7 +175,7 @@ var ServiceHookMergeRequestBody = []byte(`{
"event_type": "merge_request",
"user": {
"id": 2,
"name": "te st",
"name": "the test",
"username": "test",
"avatar_url": "https://www.gravatar.com/avatar/dd46a756faad4727fb679320751f6dea?s=80&d=identicon",
"email": "test@test.test"
Expand All @@ -188,7 +188,7 @@ var ServiceHookMergeRequestBody = []byte(`{
"avatar_url": null,
"git_ssh_url": "git@10.40.8.5:test/woodpecker.git",
"git_http_url": "http://10.40.8.5:3200/test/woodpecker.git",
"namespace": "te st",
"namespace": "the test",
"visibility_level": 20,
"path_with_namespace": "test/woodpecker",
"default_branch": "master",
Expand Down Expand Up @@ -235,7 +235,7 @@ var ServiceHookMergeRequestBody = []byte(`{
"avatar_url": "http://example.com/uploads/project/avatar/555/Outh-20-Logo.jpg",
"git_ssh_url": "git@10.40.8.5:test/woodpecker.git",
"git_http_url": "http://10.40.8.5:3200/test/woodpecker.git",
"namespace": "te st",
"namespace": "the test",
"visibility_level": 20,
"path_with_namespace": "test/woodpecker",
"default_branch": "develop",
Expand All @@ -253,7 +253,7 @@ var ServiceHookMergeRequestBody = []byte(`{
"avatar_url": "http://example.com/uploads/project/avatar/555/Outh-20-Logo.jpg",
"git_ssh_url": "git@10.40.8.5:test/woodpecker.git",
"git_http_url": "http://10.40.8.5:3200/test/woodpecker.git",
"namespace": "te st",
"namespace": "the test",
"visibility_level": 20,
"path_with_namespace": "test/woodpecker",
"default_branch": "develop",
Expand All @@ -270,7 +270,7 @@ var ServiceHookMergeRequestBody = []byte(`{
"timestamp": "2021-09-27T05:01:20+00:00",
"url": "http://10.40.8.5:3200/test/woodpecker/-/commit/0ab96a10266b95b4b533dcfd98738015fbe70889",
"author": {
"name": "te st",
"name": "the test",
"email": "test@test.test"
}
},
Expand Down
2 changes: 1 addition & 1 deletion server/router/middleware/session/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/woodpecker-ci/woodpecker/shared/token"
)

// AuthorizeAgent authorizes requsts from build agents to access the queue.
// AuthorizeAgent authorizes requests from build agents to access the queue.
func AuthorizeAgent(c *gin.Context) {
secret := c.MustGet("agent").(string)
if secret == "" {
Expand Down
2 changes: 1 addition & 1 deletion server/shared/procStatus.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func UpdateProcToStatusStarted(store UpdateProcStore, proc model.Proc, state rpc
func UpdateProcToStatusSkipped(store UpdateProcStore, proc model.Proc, stopped int64) (*model.Proc, error) {
proc.State = model.StatusSkipped
if proc.Started != 0 {
proc.State = model.StatusSuccess // for deamons that are killed
proc.State = model.StatusSuccess // for daemons that are killed
proc.Stopped = stopped
}
return &proc, store.ProcUpdate(&proc)
Expand Down
2 changes: 1 addition & 1 deletion server/store/datastore/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,6 @@ func TestConfigIndexes(t *testing.T) {
Hash: hash,
},
); err == nil {
t.Errorf("Unexpected error: dupliate sha")
t.Errorf("Unexpected error: duplicate sha")
}
}
2 changes: 1 addition & 1 deletion server/store/datastore/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func TestFileIndexes(t *testing.T) {
},
bytes.NewBufferString("hello world"),
); err == nil {
t.Errorf("Unexpected error: dupliate pid")
t.Errorf("Unexpected error: duplicate pid")
}
}

Expand Down
4 changes: 2 additions & 2 deletions server/store/datastore/procs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func TestProcIndexes(t *testing.T) {
Name: "clone",
},
}); err == nil {
t.Errorf("Unexpected error: dupliate pid")
t.Errorf("Unexpected error: duplicate pid")
}

// // fail due to duplicate process name
Expand All @@ -244,7 +244,7 @@ func TestProcIndexes(t *testing.T) {
// Name: "build",
// },
// }); err == nil {
// t.Errorf("Unexpected error: dupliate name")
// t.Errorf("Unexpected error: duplicate name")
// }
}

Expand Down
2 changes: 1 addition & 1 deletion server/store/datastore/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,6 @@ func TestRegistryIndexes(t *testing.T) {
Username: "baz",
Password: "qux",
}); err == nil {
t.Errorf("Unexpected error: dupliate address")
t.Errorf("Unexpected error: duplicate address")
}
}
2 changes: 1 addition & 1 deletion server/store/datastore/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,6 @@ func TestSecretIndexes(t *testing.T) {
Name: "foo",
Value: "baz",
}); err == nil {
t.Errorf("Unexpected error: dupliate name")
t.Errorf("Unexpected error: duplicate name")
}
}
2 changes: 1 addition & 1 deletion server/store/datastore/sender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ func TestSenderIndexes(t *testing.T) {
Allow: true,
Block: false,
}); err == nil {
t.Errorf("Unexpected error: dupliate login")
t.Errorf("Unexpected error: duplicate login")
}
}
2 changes: 1 addition & 1 deletion server/store/datastore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func pingDatabase(db *sql.DB) (err error) {
return
}

// helper function to setup the databsae by performing
// helper function to setup the database by performing
// automated database migration steps.
func setupDatabase(driver string, db *sql.DB) error {
return ddl.Migrate(driver, db)
Expand Down
Loading