diff options
-rw-r--r-- | .codespellrc | 6 | ||||
-rw-r--r-- | .github/workflows/codespell.yml | 19 | ||||
-rw-r--r-- | bridge/core/bridge.go | 2 | ||||
-rw-r--r-- | bridge/github/client.go | 2 | ||||
-rw-r--r-- | bridge/github/import_test.go | 4 | ||||
-rw-r--r-- | bridge/gitlab/export.go | 2 | ||||
-rw-r--r-- | bridge/jira/client.go | 2 | ||||
-rw-r--r-- | bridge/launchpad/launchpad_api.go | 4 | ||||
-rw-r--r-- | doc/howto-github.md | 2 | ||||
-rw-r--r-- | entities/identity/key.go | 2 | ||||
-rw-r--r-- | entity/dag/op_set_metadata_test.go | 8 | ||||
-rw-r--r-- | entity/dag/operation_pack.go | 2 | ||||
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | go.sum | 4 | ||||
-rw-r--r-- | webui/src/components/Header/Header.tsx | 2 |
15 files changed, 44 insertions, 19 deletions
diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..750692b5 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +skip = .git,.venv,*.svg,package-lock.json +# ot,fo,te - used as short variable names +# optionall - OptionAll but codespell is case insensitive +# testing - TestIn +ignore-words-list = ot,fo,te,optionall,testin diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..5768d7c6 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v1 diff --git a/bridge/core/bridge.go b/bridge/core/bridge.go index b410b470..1fc631f0 100644 --- a/bridge/core/bridge.go +++ b/bridge/core/bridge.go @@ -141,7 +141,7 @@ func DefaultBridge(repo *cache.RepoCache) (*Bridge, error) { } if len(bridges) > 1 { - return nil, fmt.Errorf("multiple bridge are configured, you need to select one explicitely") + return nil, fmt.Errorf("multiple bridge are configured, you need to select one explicitly") } return LoadBridge(repo, bridges[0]) diff --git a/bridge/github/client.go b/bridge/github/client.go index 361d0ee5..974c3067 100644 --- a/bridge/github/client.go +++ b/bridge/github/client.go @@ -20,7 +20,7 @@ type Client interface { Query(context.Context, interface{}, map[string]interface{}) error } -// rateLimitHandlerClient wrapps the Github client and adds improved error handling and handling of +// rateLimitHandlerClient wraps the Github client and adds improved error handling and handling of // Github's GraphQL rate limit. type rateLimitHandlerClient struct { sc Client diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go index 5fafcce1..52a3f852 100644 --- a/bridge/github/import_test.go +++ b/bridge/github/import_test.go @@ -123,11 +123,11 @@ func TestGithubImporter(t *testing.T) { }, }, { - name: "transfered issue", + name: "transferred issue", url: "https://github.com/MichaelMure/git-bug-test-github-bridge/issues/8", bug: &bug.Snapshot{ Operations: []dag.Operation{ - bug.NewCreateOp(author, 0, "transfered issue", "", nil), + bug.NewCreateOp(author, 0, "transferred issue", "", nil), }, }, }, diff --git a/bridge/gitlab/export.go b/bridge/gitlab/export.go index b3a02447..3beaec38 100644 --- a/bridge/gitlab/export.go +++ b/bridge/gitlab/export.go @@ -356,7 +356,7 @@ func (ge *gitlabExporter) exportBug(ctx context.Context, b *cache.BugCache, out case *bug.LabelChangeOperation: // we need to set the actual list of labels at each label change operation - // because gitlab update issue requests need directly the latest list of the verison + // because gitlab update issue requests need directly the latest list of the version for _, label := range op.Added { labelSet[label.String()] = struct{}{} diff --git a/bridge/jira/client.go b/bridge/jira/client.go index c5fd1776..0e4e561f 100644 --- a/bridge/jira/client.go +++ b/bridge/jira/client.go @@ -1361,7 +1361,7 @@ func (client *Client) DoTransition(issueKeyOrID string, transitionID string) (ti // TODO(josh)[767ee72]: Figure out a good way to "configure" the // open/close state mapping. It would be *great* if we could actually - // *compute* the necessary transitions and prompt for missing metatdata... + // *compute* the necessary transitions and prompt for missing metadata... // but that is complex var buffer bytes.Buffer _, _ = fmt.Fprintf(&buffer, diff --git a/bridge/launchpad/launchpad_api.go b/bridge/launchpad/launchpad_api.go index 763e774e..d8b31e44 100644 --- a/bridge/launchpad/launchpad_api.go +++ b/bridge/launchpad/launchpad_api.go @@ -10,7 +10,7 @@ package launchpad * - SearchTasks should yield bugs one by one * * TODO (maybe): - * - Authentication (this might help retrieving email adresses) + * - Authentication (this might help retrieving email addresses) */ import ( @@ -83,7 +83,7 @@ func (lapi *launchpadAPI) SearchTasks(ctx context.Context, project string) ([]LP var bugs []LPBug // First, let us build the URL. Not all statuses are included by - // default, so we have to explicitely enumerate them. + // default, so we have to explicitly enumerate them. validStatuses := [13]string{ "New", "Incomplete", "Opinion", "Invalid", "Won't Fix", "Expired", "Confirmed", "Triaged", diff --git a/doc/howto-github.md b/doc/howto-github.md index ba3e380c..47d93434 100644 --- a/doc/howto-github.md +++ b/doc/howto-github.md @@ -72,7 +72,7 @@ For a richer and more user friendly UI, `git-bug` proposes a web UI (read-only a ## Want more? -If you interested to read more about `git-bug`, have a look at the followings: +If you interested to read more about `git-bug`, have a look at the following: - [the project itself, with a more complete readme](https://github.com/MichaelMure/git-bug) - [a bird view of the internals](https://github.com/MichaelMure/git-bug/blob/master/doc/architecture.md) - [a description of the data model](https://github.com/MichaelMure/git-bug/blob/master/doc/model.md) diff --git a/entities/identity/key.go b/entities/identity/key.go index 82b9b95c..87271dd5 100644 --- a/entities/identity/key.go +++ b/entities/identity/key.go @@ -23,7 +23,7 @@ type Key struct { private *packet.PrivateKey } -// GenerateKey generate a keypair (public+private) +// GenerateKey generate a key pair (public+private) // The type and configuration of the key is determined by the default value in go's OpenPGP. func GenerateKey() *Key { entity, err := openpgp.NewEntity("", "", "", &packet.Config{ diff --git a/entity/dag/op_set_metadata_test.go b/entity/dag/op_set_metadata_test.go index 07ece013..a06f89da 100644 --- a/entity/dag/op_set_metadata_test.go +++ b/entity/dag/op_set_metadata_test.go @@ -54,7 +54,7 @@ func TestSetMetadata(t *testing.T) { target1Metadata := snap.AllOperations()[0].AllMetadata() require.Len(t, target1Metadata, 2) - // original key is not overrided + // original key is not overridden require.Equal(t, target1Metadata["key"], "value") // new key is set require.Equal(t, target1Metadata["key2"], "value") @@ -78,7 +78,7 @@ func TestSetMetadata(t *testing.T) { target2Metadata = snap.AllOperations()[1].AllMetadata() require.Len(t, target2Metadata, 2) - // original key is not overrided + // original key is not overridden require.Equal(t, target2Metadata["key2"], "value2") // new key is set require.Equal(t, target2Metadata["key3"], "value3") @@ -93,9 +93,9 @@ func TestSetMetadata(t *testing.T) { target1Metadata = snap.AllOperations()[0].AllMetadata() require.Len(t, target1Metadata, 2) - // original key is not overrided + // original key is not overridden require.Equal(t, target1Metadata["key"], "value") - // previously set key is not overrided + // previously set key is not overridden require.Equal(t, target1Metadata["key2"], "value") target2Metadata = snap.AllOperations()[1].AllMetadata() diff --git a/entity/dag/operation_pack.go b/entity/dag/operation_pack.go index cc6c81f4..c999ff23 100644 --- a/entity/dag/operation_pack.go +++ b/entity/dag/operation_pack.go @@ -82,7 +82,7 @@ func (opp *operationPack) Validate() error { } // Write writes the OperationPack in git, with zero, one or more parent commits. -// If the repository has a keypair able to sign (that is, with a private key), the resulting commit is signed with that key. +// If the repository has a key pair able to sign (that is, with a private key), the resulting commit is signed with that key. // Return the hash of the created commit. func (opp *operationPack) Write(def Definition, repo repository.Repo, parentCommit ...repository.Hash) (repository.Hash, error) { if err := opp.Validate(); err != nil { @@ -30,7 +30,7 @@ require ( github.com/vektah/gqlparser/v2 v2.5.1 github.com/xanzy/go-gitlab v0.79.1 golang.org/x/crypto v0.5.0 - golang.org/x/oauth2 v0.3.0 + golang.org/x/oauth2 v0.4.0 golang.org/x/sync v0.1.0 golang.org/x/sys v0.4.0 golang.org/x/text v0.6.0 @@ -352,8 +352,8 @@ golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/oauth2 v0.3.0 h1:6l90koy8/LaBLmLu8jpHeHexzMwEita0zFfYlggy2F8= -golang.org/x/oauth2 v0.3.0/go.mod h1:rQrIauxkUhJ6CuwEXwymO2/eh4xz2ZWF1nBkcxS+tGk= +golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/webui/src/components/Header/Header.tsx b/webui/src/components/Header/Header.tsx index 961696d7..0bbbe3bb 100644 --- a/webui/src/components/Header/Header.tsx +++ b/webui/src/components/Header/Header.tsx @@ -69,7 +69,7 @@ function Header() { const location = useLocation(); // Prevents error of invalid tab selection in <Tabs> - // Will return a valid tab path or false if path is unkown. + // Will return a valid tab path or false if path is unknown. function highlightTab() { const validTabs = ['/', '/code', '/pulls', '/settings']; const tab = validTabs.find((tabPath) => tabPath === location.pathname); |