mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-03 06:08:42 +00:00
Fix various typos (#416)
Fix various typos found via `codespell -q 3 -S vendor -L pullrequest,pullrequests`
This commit is contained in:
parent
3254a7ca00
commit
9b687a923e
28 changed files with 52 additions and 52 deletions
|
@ -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)
|
||||
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
Private key file mounted into your Woodpecker container at runtime as a volume.
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 != "" {
|
||||
|
|
|
@ -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
|
||||
|
@ -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)
|
||||
|
|
|
@ -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(),
|
||||
|
|
22
server/remote/gitlab/testdata/hooks.go
vendored
22
server/remote/gitlab/testdata/hooks.go
vendored
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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": [
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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": [
|
||||
|
@ -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"
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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"
|
||||
}
|
||||
},
|
||||
|
|
|
@ -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 == "" {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
@ -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")
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -181,7 +181,7 @@ paths:
|
|||
|
||||
|
||||
#
|
||||
# Repos Param Encryption Enpoint
|
||||
# Repos Param Encryption Endpoint
|
||||
# TODO: properly add the input output schema
|
||||
|
||||
/repos/{owner}/{name}/encrypt:
|
||||
|
@ -600,7 +600,7 @@ definitions:
|
|||
description: The url for the avatar image.
|
||||
type: string
|
||||
admin:
|
||||
description: Whether the account has administrative priviledges.
|
||||
description: Whether the account has administrative privileges.
|
||||
type: boolean
|
||||
active:
|
||||
description: Whether the account is currently active.
|
||||
|
|
|
@ -143,7 +143,7 @@ func keyFunc(token *Token, fn SecretFunc) jwt.Keyfunc {
|
|||
token.Kind, _ = kindv.(string)
|
||||
|
||||
// extract the token value and cast to
|
||||
// exepected type.
|
||||
// expected type.
|
||||
textv, ok := claims["text"]
|
||||
if !ok {
|
||||
return nil, jwt.ValidationError{}
|
||||
|
|
|
@ -2,7 +2,7 @@ import React, { Component } from "react";
|
|||
import { ExpandIcon, BackIcon } from "shared/components/icons/index";
|
||||
import style from "./breadcrumb.less";
|
||||
|
||||
// breadcrumb separater icon.
|
||||
// breadcrumb separator icon.
|
||||
export const SEPARATOR = <ExpandIcon size={18} className={style.separator} />;
|
||||
|
||||
// breadcrumb back button.
|
||||
|
|
|
@ -42,7 +42,7 @@ export function fetchFeedOnce(tree, client) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Subscribes to the server-side event feed and synchonizes
|
||||
* Subscribes to the server-side event feed and synchronizes
|
||||
* event data with the state tree.
|
||||
*
|
||||
* @param {Object} tree - The drone state tree.
|
||||
|
|
|
@ -14,7 +14,7 @@ const (
|
|||
func main() {
|
||||
// create an http client with oauth authentication.
|
||||
config := new(oauth2.Config)
|
||||
auther := config.Client(
|
||||
authenticator := config.Client(
|
||||
oauth2.NoContext,
|
||||
&oauth2.Token{
|
||||
AccessToken: token,
|
||||
|
@ -22,7 +22,7 @@ func main() {
|
|||
)
|
||||
|
||||
// create the woodpecker client with authenticator
|
||||
client := woodpecker.NewClient(host, auther)
|
||||
client := woodpecker.NewClient(host, authenticator)
|
||||
|
||||
// gets the current user
|
||||
user, err := client.Self()
|
||||
|
|
Loading…
Reference in a new issue