diff --git a/_typos.toml b/_typos.toml new file mode 100644 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,23 @@ +[files] +# Don't check these files +extend-exclude = [ + ".git/", + "*.lock", + "go.mod", + "go.sum", +] + +[default.extend-words] +# False positives - words that typos incorrectly flags +# Go variable name commonly used for NiceDiff +"nd" = "nd" +# Acronym for "Does Not Exist" used in label operations +"DNE" = "DNE" +# CSS class for syntax highlighting (other) +"ot" = "ot" +# Brand name HashiCorp +"Hashi" = "Hashi" +# External API from goldmark-callout package (unfixable upstream typo) +"Extention" = "Extention" +# External API from goldmark package (unfixable upstream typo) +"Precending" = "Precending" diff --git a/appview/db/issues.go b/appview/db/issues.go --- a/appview/db/issues.go +++ b/appview/db/issues.go @@ -252,11 +252,11 @@ } } // collect references for each issue - allReferencs, err := GetReferencesAll(e, orm.FilterIn("from_at", issueAts)) + allReferences, err := GetReferencesAll(e, orm.FilterIn("from_at", issueAts)) if err != nil { return nil, fmt.Errorf("failed to query reference_links: %w", err) } - for issueAt, references := range allReferencs { + for issueAt, references := range allReferences { if issue, ok := issueMap[issueAt.String()]; ok { issue.References = references } @@ -452,11 +452,11 @@ } // collect references for each comments commentAts := slices.Collect(maps.Keys(commentMap)) - allReferencs, err := GetReferencesAll(e, orm.FilterIn("from_at", commentAts)) + allReferences, err := GetReferencesAll(e, orm.FilterIn("from_at", commentAts)) if err != nil { return nil, fmt.Errorf("failed to query reference_links: %w", err) } - for commentAt, references := range allReferencs { + for commentAt, references := range allReferences { if comment, ok := commentMap[commentAt.String()]; ok { comment.References = references } diff --git a/appview/db/notifications.go b/appview/db/notifications.go --- a/appview/db/notifications.go +++ b/appview/db/notifications.go @@ -191,7 +191,7 @@ if err != nil { return nil, fmt.Errorf("failed to parse created timestamp: %w", err) } - nwe := &models.NotificationWithEntity{Notification: &n} + entry := &models.NotificationWithEntity{Notification: &n} // populate repo if present if rId.Valid { @@ -211,7 +211,7 @@ } if rTopicStr.Valid { repo.Topics = strings.Fields(rTopicStr.String) } - nwe.Repo = &repo + entry.Repo = &repo } // populate issue if present @@ -229,7 +229,7 @@ } if iOpen.Valid { issue.Open = iOpen.Bool } - nwe.Issue = &issue + entry.Issue = &issue } // populate pull if present @@ -247,10 +247,10 @@ } if pState.Valid { pull.State = models.PullState(pState.Int64) } - nwe.Pull = &pull + entry.Pull = &pull } - notifications = append(notifications, nwe) + notifications = append(notifications, entry) } return notifications, nil diff --git a/appview/db/pulls.go b/appview/db/pulls.go --- a/appview/db/pulls.go +++ b/appview/db/pulls.go @@ -487,11 +487,11 @@ } // collect references for each comments commentAts := slices.Collect(maps.Keys(commentMap)) - allReferencs, err := GetReferencesAll(e, orm.FilterIn("from_at", commentAts)) + allReferences, err := GetReferencesAll(e, orm.FilterIn("from_at", commentAts)) if err != nil { return nil, fmt.Errorf("failed to query reference_links: %w", err) } - for commentAt, references := range allReferencs { + for commentAt, references := range allReferences { if comment, ok := commentMap[commentAt.String()]; ok { comment.References = references } diff --git a/appview/indexer/issues/indexer.go b/appview/indexer/issues/indexer.go --- a/appview/indexer/issues/indexer.go +++ b/appview/indexer/issues/indexer.go @@ -48,7 +48,7 @@ // Init initializes the indexer func (ix *Indexer) Init(ctx context.Context, e db.Execer) { l := tlog.FromContext(ctx) - existed, err := ix.intialize(ctx) + existed, err := ix.initialize(ctx) if err != nil { log.Fatalln("failed to initialize issue indexer", err) } @@ -117,7 +117,7 @@ return mapping, nil } -func (ix *Indexer) intialize(ctx context.Context) (bool, error) { +func (ix *Indexer) initialize(ctx context.Context) (bool, error) { if ix.indexer != nil { return false, errors.New("indexer is already initialized") } diff --git a/appview/indexer/pulls/indexer.go b/appview/indexer/pulls/indexer.go --- a/appview/indexer/pulls/indexer.go +++ b/appview/indexer/pulls/indexer.go @@ -47,7 +47,7 @@ // Init initializes the indexer func (ix *Indexer) Init(ctx context.Context, e db.Execer) { l := tlog.FromContext(ctx) - existed, err := ix.intialize(ctx) + existed, err := ix.initialize(ctx) if err != nil { log.Fatalln("failed to initialize pull indexer", err) } @@ -112,7 +112,7 @@ return mapping, nil } -func (ix *Indexer) intialize(ctx context.Context) (bool, error) { +func (ix *Indexer) initialize(ctx context.Context) (bool, error) { if ix.indexer != nil { return false, errors.New("indexer is already initialized") } diff --git a/appview/indexer/repos/indexer.go b/appview/indexer/repos/indexer.go --- a/appview/indexer/repos/indexer.go +++ b/appview/indexer/repos/indexer.go @@ -51,7 +51,7 @@ // Init initializes the indexer func (ix *Indexer) Init(ctx context.Context, e db.Execer) { l := tlog.FromContext(ctx) - existed, err := ix.intialize(ctx) + existed, err := ix.initialize(ctx) if err != nil { log.Fatalln("failed to initialize repo indexer", err) } @@ -188,7 +188,7 @@ return mapping, nil } -func (ix *Indexer) intialize(ctx context.Context) (bool, error) { +func (ix *Indexer) initialize(ctx context.Context) (bool, error) { if ix.indexer != nil { return false, errors.New("indexer is already initialized") } diff --git a/appview/ingester.go b/appview/ingester.go --- a/appview/ingester.go +++ b/appview/ingester.go @@ -818,7 +818,7 @@ if err != nil { return fmt.Errorf("failed to get registration: %w", err) } if len(registrations) != 1 { - return fmt.Errorf("got incorret number of registrations: %d, expected 1", len(registrations)) + return fmt.Errorf("got incorrect number of registrations: %d, expected 1", len(registrations)) } registration := registrations[0] @@ -1100,7 +1100,7 @@ return fmt.Errorf("failed to find subject: %w || subject count %d", err, len(i)) } repo = i[0].Repo default: - return fmt.Errorf("unsupport label subject: %s", collection) + return fmt.Errorf("unsupported label subject: %s", collection) } actx, err := db.NewLabelApplicationCtx(ddb, orm.FilterIn("at_uri", repo.Labels)) diff --git a/appview/issues/issues.go b/appview/issues/issues.go --- a/appview/issues/issues.go +++ b/appview/issues/issues.go @@ -602,7 +602,7 @@ defer tx.Rollback() _, err = db.AddIssueComment(tx, newComment) if err != nil { - l.Error("failed to perferom update-description query", "err", err) + l.Error("failed to perform update-description query", "err", err) rp.pages.Notice(w, "repo-notice", "Failed to update description, try again later.") return } diff --git a/appview/knots/knots.go b/appview/knots/knots.go --- a/appview/knots/knots.go +++ b/appview/knots/knots.go @@ -97,7 +97,7 @@ http.Error(w, "Not found", http.StatusNotFound) return } if len(registrations) != 1 { - l.Error("got incorret number of registrations", "got", len(registrations), "expected", 1) + l.Error("got incorrect number of registrations", "got", len(registrations), "expected", 1) return } registration := registrations[0] @@ -285,7 +285,7 @@ fail() return } if len(registrations) != 1 { - l.Error("got incorret number of registrations", "got", len(registrations), "expected", 1) + l.Error("got incorrect number of registrations", "got", len(registrations), "expected", 1) fail() return } @@ -394,7 +394,7 @@ fail() return } if len(registrations) != 1 { - l.Error("got incorret number of registrations", "got", len(registrations), "expected", 1) + l.Error("got incorrect number of registrations", "got", len(registrations), "expected", 1) fail() return } @@ -485,7 +485,7 @@ fail() return } if len(registrations) != 1 { - l.Error("got incorret number of registrations", "got", len(registrations), "expected", 1) + l.Error("got incorrect number of registrations", "got", len(registrations), "expected", 1) fail() return } @@ -521,7 +521,7 @@ l.Error("failed to get registration", "err", err) return } if len(registrations) != 1 { - l.Error("got incorret number of registrations", "got", len(registrations), "expected", 1) + l.Error("got incorrect number of registrations", "got", len(registrations), "expected", 1) return } registration := registrations[0] @@ -629,7 +629,7 @@ l.Error("failed to get registration", "err", err) return } if len(registrations) != 1 { - l.Error("got incorret number of registrations", "got", len(registrations), "expected", 1) + l.Error("got incorrect number of registrations", "got", len(registrations), "expected", 1) return } diff --git a/appview/middleware/middleware.go b/appview/middleware/middleware.go --- a/appview/middleware/middleware.go +++ b/appview/middleware/middleware.go @@ -124,7 +124,7 @@ actor := mw.oauth.GetMultiAccountUser(r) if actor == nil { // we need a logged in user l.Warn("not logged in, redirecting") - http.Error(w, "Forbiden", http.StatusUnauthorized) + http.Error(w, "Forbidden", http.StatusUnauthorized) return } domain := chi.URLParam(r, "domain") @@ -136,7 +136,7 @@ ok, err := mw.enforcer.E.HasGroupingPolicy(actor.Active.Did, group, domain) if err != nil || !ok { l.Warn("permission denied", "did", actor.Active.Did, "group", group, "domain", domain) - http.Error(w, "Forbiden", http.StatusUnauthorized) + http.Error(w, "Forbidden", http.StatusUnauthorized) return } @@ -158,7 +158,7 @@ actor := mw.oauth.GetMultiAccountUser(r) if actor == nil { // we need a logged in user l.Warn("not logged in, redirecting") - http.Error(w, "Forbiden", http.StatusUnauthorized) + http.Error(w, "Forbidden", http.StatusUnauthorized) return } f, err := mw.repoResolver.Resolve(r) @@ -170,7 +170,7 @@ ok, err := mw.enforcer.E.Enforce(actor.Active.Did, f.Knot, f.RepoIdentifier(), requiredPerm) if err != nil || !ok { l.Warn("permission denied", "did", actor.Active.Did, "perm", requiredPerm, "repo", f.RepoIdentifier()) - http.Error(w, "Forbiden", http.StatusUnauthorized) + http.Error(w, "Forbidden", http.StatusUnauthorized) return } @@ -332,7 +332,7 @@ // this should serve the go-import meta tag even if the path is technically // a 404 like tangled.sh/oppi.li/go-git/v5 // // we're keeping the tangled.sh go-import tag too to maintain backward -// compatiblity for modules that still point there. they will be redirected +// compatibility for modules that still point there. they will be redirected // to fetch source from tangled.org func (mw Middleware) GoImport() middlewareFunc { return func(next http.Handler) http.Handler { diff --git a/appview/models/notifications.go b/appview/models/notifications.go --- a/appview/models/notifications.go +++ b/appview/models/notifications.go @@ -104,7 +104,7 @@ return prefs.IssueCommented case NotificationTypeIssueClosed: return prefs.IssueClosed case NotificationTypeIssueReopen: - return prefs.IssueCreated // smae pref for now + return prefs.IssueCreated // same pref for now case NotificationTypePullCreated: return prefs.PullCreated case NotificationTypePullCommented: diff --git a/appview/pages/markup/reference_link.go b/appview/pages/markup/reference_link.go --- a/appview/pages/markup/reference_link.go +++ b/appview/pages/markup/reference_link.go @@ -16,7 +16,7 @@ ) // FindReferences collects all links referencing tangled-related objects // like issues, PRs, comments or even @-mentions -// This funciton doesn't actually check for the existence of records in the DB +// This function doesn't actually check for the existence of records in the DB // or the PDS; it merely returns a list of what are presumed to be references. func FindReferences(host string, source string) ([]string, []models.ReferenceLink) { var ( diff --git a/appview/pages/pages.go b/appview/pages/pages.go --- a/appview/pages/pages.go +++ b/appview/pages/pages.go @@ -52,7 +52,7 @@ logger *slog.Logger } func NewPages(config *config.Config, res *idresolver.Resolver, database *db.DB, logger *slog.Logger) *Pages { - // initialized with safe defaults, can be overriden per use + // initialized with safe defaults, can be overridden per use rctx := &markup.RenderContext{ IsDev: config.Core.Dev, Hostname: config.Core.AppviewHost, diff --git a/appview/pages/templates/repo/pipelines/workflow.html b/appview/pages/templates/repo/pipelines/workflow.html --- a/appview/pages/templates/repo/pipelines/workflow.html +++ b/appview/pages/templates/repo/pipelines/workflow.html @@ -12,7 +12,7 @@
{{ block "sidebar" . }} {{ end }}
- + {{ if $.RepoInfo.Roles.IsOwner }}
diff --git a/appview/pages/templates/repo/settings/general.html b/appview/pages/templates/repo/settings/general.html --- a/appview/pages/templates/repo/settings/general.html +++ b/appview/pages/templates/repo/settings/general.html @@ -103,7 +103,7 @@ default labels, or create entirely custom labels.

- {{ $title := "Unubscribe from all labels" }} + {{ $title := "Unsubscribe from all labels" }} {{ $icon := "x" }} {{ $text := "unsubscribe all" }} {{ $action := "unsubscribe" }} diff --git a/appview/pulls/pulls.go b/appview/pulls/pulls.go --- a/appview/pulls/pulls.go +++ b/appview/pulls/pulls.go @@ -1469,7 +1469,7 @@ return } if err := s.validator.ValidatePatch(&patch); err != nil { - s.logger.Error("faield to validate patch", "err", err) + s.logger.Error("failed to validate patch", "err", err) s.pages.Notice(w, "patch-error", "Invalid patch format. Please provide a valid git diff or format-patch.") return } @@ -1983,7 +1983,7 @@ additions := make(map[string]*models.Pull) deletions := make(map[string]*models.Pull) updated := make(map[string]struct{}) - // pulls in orignal stack but not in new one + // pulls in original stack but not in new one for _, op := range origStack { if _, ok := newById[op.ChangeId]; !ok { deletions[op.ChangeId] = op diff --git a/appview/repo/repo.go b/appview/repo/repo.go --- a/appview/repo/repo.go +++ b/appview/repo/repo.go @@ -1073,7 +1073,7 @@ l = l.With("cloneUrl", forkSourceUrl) rkey := tid.TID() - // TODO: this could coordinate better with the knot to recieve a clone status + // TODO: this could coordinate better with the knot to receive a clone status client, err := rp.oauth.ServiceClient( r, oauth.WithService(targetKnot), diff --git a/appview/repo/settings.go b/appview/repo/settings.go --- a/appview/repo/settings.go +++ b/appview/repo/settings.go @@ -631,7 +631,7 @@ }, }) if err != nil { - l.Error("failed to perferom update-repo query", "err", err) + l.Error("failed to perform update-repo query", "err", err) // failed to get record rp.pages.Notice(w, noticeId, "Failed to save repository information, unable to save to PDS.") return diff --git a/blog/posts/6-months.md b/blog/posts/6-months.md --- a/blog/posts/6-months.md +++ b/blog/posts/6-months.md @@ -86,7 +86,7 @@ ![issue thread](https://assets.tangled.network/blog/issue-threading.webp) ## hosted PDS -A complaint we often recieved was the need for a Bluesky account to use +A complaint we often received was the need for a Bluesky account to use Tangled; and besides, we realised that the overlap between Bluesky users and possible Tangled users only goes so far -- we aim to be a generic code forge after all, AT just happens to be an implementation diff --git a/blog/posts/intro.md b/blog/posts/intro.md --- a/blog/posts/intro.md +++ b/blog/posts/intro.md @@ -51,7 +51,7 @@ should feel natural and stay out of the way. Tangled's architecture enables common workflows to work as you'd expect, all while remaining decentralized. -We believe that atproto has greatly simplfied one of the hardest parts +We believe that atproto has greatly simplified one of the hardest parts of social media: having your friends on it. Today, we're rolling out invite-only access to Tangled -- join us on IRC at `#tangled` on [libera.chat](https://libera.chat) and we'll get you set up. diff --git a/blog/posts/seed.md b/blog/posts/seed.md --- a/blog/posts/seed.md +++ b/blog/posts/seed.md @@ -36,7 +36,7 @@ generation of open source. Whatever that looks like: hundreds of devs building artisanal libraries, or one dev and a hundred agents building a micro-SaaS. -And finding the right investors to help us acheive this vision wasn't +And finding the right investors to help us achieve this vision wasn't something we took lightly. We spent months getting to know potential partners -- among which, byFounders stood out immediately. Like us, they're community-driven at their core, and their commitment to diff --git a/docs/DOCS.md b/docs/DOCS.md --- a/docs/DOCS.md +++ b/docs/DOCS.md @@ -1657,7 +1657,7 @@ > ``` > > to store the builder VM in a temporary dir. > -> You should read and follow [all the other intructions][darwin builder vm] to +> You should read and follow [all the other instructions][darwin builder vm] to > avoid subtle problems. Alternatively, you can use any other method to set up a diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -24,7 +24,7 @@ url = "https://unpkg.com/htmx.org@2.0.4/dist/htmx.min.js"; flake = false; }; htmx-ws-src = { - # strange errors in consle that i can't really make out + # strange errors in console that i can't really make out # url = "https://unpkg.com/htmx.org@2.0.4/dist/ext/ws.js"; url = "https://cdn.jsdelivr.net/npm/htmx-ext-ws@2.0.2"; flake = false; diff --git a/knotmirror/tapclient.go b/knotmirror/tapclient.go --- a/knotmirror/tapclient.go +++ b/knotmirror/tapclient.go @@ -119,7 +119,7 @@ if evt.Action == tapc.RecordUpdateAction { exist, err := t.gitm.Exist(repo) if err != nil { - return fmt.Errorf("checking git repo existance: %w", err) + return fmt.Errorf("checking git repo existence: %w", err) } if exist { // update git repo remote url diff --git a/knotserver/git/merge.go b/knotserver/git/merge.go --- a/knotserver/git/merge.go +++ b/knotserver/git/merge.go @@ -233,7 +233,7 @@ func (g *GitRepo) applySingleMailbox(singlePatch types.FormatPatch) (plumbing.Hash, error) { tmpPatch, err := createTemp(singlePatch.Raw) if err != nil { - return plumbing.ZeroHash, fmt.Errorf("failed to create temporary patch file for singluar mailbox patch: %w", err) + return plumbing.ZeroHash, fmt.Errorf("failed to create temporary patch file for singular mailbox patch: %w", err) } var stderr bytes.Buffer diff --git a/knotserver/xrpc/delete_branch.go b/knotserver/xrpc/delete_branch.go --- a/knotserver/xrpc/delete_branch.go +++ b/knotserver/xrpc/delete_branch.go @@ -68,7 +68,7 @@ return } if ok, err := x.Enforcer.IsPushAllowed(actorDid.String(), rbac.ThisServer, repoDid); !ok || err != nil { - l.Error("insufficent permissions", "did", actorDid.String(), "repo", repoDid) + l.Error("insufficient permissions", "did", actorDid.String(), "repo", repoDid) writeError(w, xrpcerr.AccessControlError(actorDid.String()), http.StatusUnauthorized) return } diff --git a/knotserver/xrpc/set_default_branch.go b/knotserver/xrpc/set_default_branch.go --- a/knotserver/xrpc/set_default_branch.go +++ b/knotserver/xrpc/set_default_branch.go @@ -70,7 +70,7 @@ return } if ok, err := x.Enforcer.IsPushAllowed(actorDid.String(), rbac.ThisServer, repoDid); !ok || err != nil { - l.Error("insufficent permissions", "did", actorDid.String()) + l.Error("insufficient permissions", "did", actorDid.String()) writeError(w, xrpcerr.AccessControlError(actorDid.String()), http.StatusUnauthorized) return } diff --git a/nix/pkgs/appview-static-files.nix b/nix/pkgs/appview-static-files.nix --- a/nix/pkgs/appview-static-files.nix +++ b/nix/pkgs/appview-static-files.nix @@ -12,7 +12,7 @@ dolly, src, }: runCommandLocal "appview-static-files" { - # TOOD(winter): figure out why this is even required after + # TODO(winter): figure out why this is even required after # changing the libraries that the tailwindcss binary loads sandboxProfile = '' (allow file-read* (subpath "/System/Library/OpenSSL")) diff --git a/patchutil/interdiff.go b/patchutil/interdiff.go --- a/patchutil/interdiff.go +++ b/patchutil/interdiff.go @@ -288,7 +288,7 @@ // we have f1 and f2, calculate interdiff interdiffFile = interdiffFiles(f1, f2) } else { - // only in patch 1, this change would have to be "inverted" to dissapear + // only in patch 1, this change would have to be "inverted" to disappear // from patch 2, so we reverseDiff(f1) reverseDiff(f1) diff --git a/patchutil/patchutil.go b/patchutil/patchutil.go --- a/patchutil/patchutil.go +++ b/patchutil/patchutil.go @@ -153,7 +153,7 @@ file.OldMode, file.NewMode = file.NewMode, file.OldMode file.BinaryFragment, file.ReverseBinaryFragment = file.ReverseBinaryFragment, file.BinaryFragment for _, fragment := range file.TextFragments { - // swap postions + // swap positions fragment.OldPosition, fragment.NewPosition = fragment.NewPosition, fragment.OldPosition fragment.OldLines, fragment.NewLines = fragment.NewLines, fragment.OldLines fragment.LinesAdded, fragment.LinesDeleted = fragment.LinesDeleted, fragment.LinesAdded diff --git a/sets/set_test.go b/sets/set_test.go --- a/sets/set_test.go +++ b/sets/set_test.go @@ -240,7 +240,7 @@ t.Error("Difference set should contain 1") } } -func TestPropertySingleonLen(t *testing.T) { +func TestPropertySingletonLen(t *testing.T) { f := func(item int) bool { single := Singleton(item) return single.Len() == 1 diff --git a/spindle/engine/engine.go b/spindle/engine/engine.go --- a/spindle/engine/engine.go +++ b/spindle/engine/engine.go @@ -85,7 +85,7 @@ err = eng.SetupWorkflow(ctx, wid, &w, wfLogger) if err != nil { // TODO(winter): Should this always set StatusFailed? // In the original, we only do in a subset of cases. - l.Error("setting up worklow", "wid", wid, "err", err) + l.Error("setting up workflow", "wid", wid, "err", err) destroyErr := eng.DestroyWorkflow(ctx, wid) if destroyErr != nil { diff --git a/spindle/engines/nixery/engine.go b/spindle/engines/nixery/engine.go --- a/spindle/engines/nixery/engine.go +++ b/spindle/engines/nixery/engine.go @@ -245,7 +245,7 @@ Type: mount.TypeTmpfs, Target: "/tmp", ReadOnly: false, TmpfsOptions: &mount.TmpfsOptions{ - Mode: 0o1777, // world-writeable sticky bit + Mode: 0o1777, // world-writable sticky bit Options: [][]string{ {"exec"}, }, diff --git a/spindle/xrpc/add_secret.go b/spindle/xrpc/add_secret.go --- a/spindle/xrpc/add_secret.go +++ b/spindle/xrpc/add_secret.go @@ -69,7 +69,7 @@ return } if ok, err := x.Enforcer.IsSettingsAllowed(actorDid.String(), rbac.ThisServer, didPath); !ok || err != nil { - l.Error("insufficent permissions", "did", actorDid.String()) + l.Error("insufficient permissions", "did", actorDid.String()) writeError(w, xrpcerr.AccessControlError(actorDid.String()), http.StatusUnauthorized) return } diff --git a/spindle/xrpc/list_secrets.go b/spindle/xrpc/list_secrets.go --- a/spindle/xrpc/list_secrets.go +++ b/spindle/xrpc/list_secrets.go @@ -64,7 +64,7 @@ return } if ok, err := x.Enforcer.IsSettingsAllowed(actorDid.String(), rbac.ThisServer, didPath); !ok || err != nil { - l.Error("insufficent permissions", "did", actorDid.String()) + l.Error("insufficient permissions", "did", actorDid.String()) writeError(w, xrpcerr.AccessControlError(actorDid.String()), http.StatusUnauthorized) return } diff --git a/spindle/xrpc/pipeline_cancel_pipeline.go b/spindle/xrpc/pipeline_cancel_pipeline.go --- a/spindle/xrpc/pipeline_cancel_pipeline.go +++ b/spindle/xrpc/pipeline_cancel_pipeline.go @@ -80,7 +80,7 @@ fail(xrpcerr.AccessControlError(actorDid.String())) return } for _, engine := range x.Engines { - l.Debug("destorying workflow", "wid", wid) + l.Debug("destroying workflow", "wid", wid) err = engine.DestroyWorkflow(r.Context(), wid) if err != nil { fail(xrpcerr.GenericError(fmt.Errorf("failed to destroy workflow: %w", err))) diff --git a/spindle/xrpc/remove_secret.go b/spindle/xrpc/remove_secret.go --- a/spindle/xrpc/remove_secret.go +++ b/spindle/xrpc/remove_secret.go @@ -63,7 +63,7 @@ return } if ok, err := x.Enforcer.IsSettingsAllowed(actorDid.String(), rbac.ThisServer, didPath); !ok || err != nil { - l.Error("insufficent permissions", "did", actorDid.String()) + l.Error("insufficient permissions", "did", actorDid.String()) writeError(w, xrpcerr.AccessControlError(actorDid.String()), http.StatusUnauthorized) return } diff --git a/tapc/tap.go b/tapc/tap.go --- a/tapc/tap.go +++ b/tapc/tap.go @@ -133,9 +133,9 @@ l := log.FromContext(ctx) defer func() { conn.Close() - l.Warn("closed tap conection") + l.Warn("closed tap connection") }() - l.Info("established tap conection") + l.Info("established tap connection") for { select { diff --git a/types/repo.go b/types/repo.go --- a/types/repo.go +++ b/types/repo.go @@ -1,8 +1,6 @@ package types import ( - "encoding/json" - "github.com/bluekeyes/go-gitdiff/gitdiff" "github.com/go-git/go-git/v5/plumbing/object" ) @@ -69,25 +67,6 @@ type Branch struct { Reference `json:"reference"` Commit *object.Commit `json:"commit,omitempty"` IsDefault bool `json:"is_default,omitempty"` -} - -func (b *Branch) UnmarshalJSON(data []byte) error { - aux := &struct { - Reference `json:"reference"` - Commit *object.Commit `json:"commit,omitempty"` - IsDefault bool `json:"is_default,omitempty"` - MispelledIsDefault bool `json:"is_deafult,omitempty"` // mispelled name - }{} - - if err := json.Unmarshal(data, aux); err != nil { - return err - } - - b.Reference = aux.Reference - b.Commit = aux.Commit - b.IsDefault = aux.IsDefault || aux.MispelledIsDefault // whichever was set - - return nil } type RepoTagsResponse struct { diff --git a/xrpc/errors/errors.go b/xrpc/errors/errors.go --- a/xrpc/errors/errors.go +++ b/xrpc/errors/errors.go @@ -90,7 +90,7 @@ var AccessControlError = func(d string) XrpcError { return NewXrpcError( WithTag("AccessControl"), - WithError(fmt.Errorf("DID does not have sufficent access permissions for this operation: %s", d)), + WithError(fmt.Errorf("DID does not have sufficient access permissions for this operation: %s", d)), ) }