Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Fixes typos in docs, error msgs, comments, code #990

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ glab config set editor vim --host gitlab.example.org

NO_COLOR: set to any value to avoid printing ANSI escape sequences for color output.

FORCE_HYPERLINKS: set to 1 to force hyperlinks to be output, even when not outputing to a TTY
FORCE_HYPERLINKS: set to 1 to force hyperlinks to be output, even when not outputting to a TTY
```

## What about [Lab]?
Expand Down
8 changes: 4 additions & 4 deletions api/snippets.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ var CreateSnippet = func(
client = apiClient.Lab()
}

snipet, _, err := client.Snippets.CreateSnippet(opts)
snippet, _, err := client.Snippets.CreateSnippet(opts)
if err != nil {
return nil, err
}
return snipet, err
return snippet, err
}

// CreateProjectSnippet inside the project
Expand All @@ -29,9 +29,9 @@ var CreateProjectSnippet = func(
client = apiClient.Lab()
}

snipet, _, err := client.ProjectSnippets.CreateSnippet(projectID, opts)
snippet, _, err := client.ProjectSnippets.CreateSnippet(projectID, opts)
if err != nil {
return nil, err
}
return snipet, err
return snippet, err
}
2 changes: 1 addition & 1 deletion commands/ci/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ func link(screen tcell.Screen, v1 *tview.Box, v2 *tview.Box, padding int, firstS
if dx != 0 {
hline(screen, x1+w, y2+h/2, dx-w)
if dy != 0 {
// dy != 0 means the last stage had multple jobs
// dy != 0 means the last stage had multiple jobs
screen.SetContent(x1+w+p-1, y2+h/2, '╦', nil, tcell.StyleDefault)
}
return
Expand Down
2 changes: 1 addition & 1 deletion commands/cmdutils/cmdutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const (
// Follows the format officially supported by GitLab
// https://docs.gitlab.com/ee/user/project/description_templates.html#setting-a-default-template-for-issues-and-merge-requests.
//
// TODO: load from remote repository if repo is overriden by -R flag
// TODO: load from remote repository if repo is overridden by -R flag
func LoadGitLabTemplate(tmplType, tmplName string) (string, error) {
wdir, err := git.ToplevelDir()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion commands/mr/list/mr_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func NewCmdList(f *cmdutils.Factory, runE func(opts *ListOptions) error) *cobra.

mrListCmd.Flags().StringSliceVarP(&opts.Labels, "label", "l", []string{}, "Filter merge request by label <name>")
mrListCmd.Flags().StringSliceVar(&opts.NotLabels, "not-label", []string{}, "Filter merge requests by not having label <name>")
mrListCmd.Flags().StringVar(&opts.Author, "author", "", "Fitler merge request by Author <username>")
mrListCmd.Flags().StringVar(&opts.Author, "author", "", "Filter merge request by Author <username>")
mrListCmd.Flags().StringVarP(&opts.Milestone, "milestone", "m", "", "Filter merge request by milestone <id>")
mrListCmd.Flags().StringVarP(&opts.SourceBranch, "source-branch", "s", "", "Filter by source branch <name>")
mrListCmd.Flags().StringVarP(&opts.TargetBranch, "target-branch", "t", "", "Filter by target branch <name>")
Expand Down
2 changes: 1 addition & 1 deletion commands/mr/mrutils/mrutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func MRCheckErrors(mr *gitlab.MergeRequest, err MRCheckErrOptions) error {
}

if err.MergePrivilege && !mr.User.CanMerge {
return fmt.Errorf("you do not have enough priviledges to merge this merge request")
return fmt.Errorf("you do not have enough privileges to merge this merge request")
}

if err.Conflict && mr.HasConflicts {
Expand Down
2 changes: 1 addition & 1 deletion commands/mr/mrutils/mrutils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func Test_MRCheckErrors(t *testing.T) {
errOpts: MRCheckErrOptions{
MergePrivilege: true,
},
output: "you do not have enough priviledges to merge this merge request",
output: "you do not have enough privileges to merge this merge request",
},
{
name: "conflicts",
Expand Down
12 changes: 6 additions & 6 deletions commands/project/create/project_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func NewCmdCreate(f *cmdutils.Factory) *cobra.Command {
func runCreateProject(cmd *cobra.Command, args []string, f *cmdutils.Factory) error {
var (
projectPath string
visiblity gitlab.VisibilityValue
visibility gitlab.VisibilityValue
err error
isPath bool
namespaceID int
Expand Down Expand Up @@ -141,11 +141,11 @@ func runCreateProject(cmd *cobra.Command, args []string, f *cmdutils.Factory) er
description, _ := cmd.Flags().GetString("description")

if internal, _ := cmd.Flags().GetBool("internal"); internal {
visiblity = gitlab.InternalVisibility
visibility = gitlab.InternalVisibility
} else if private, _ := cmd.Flags().GetBool("private"); private {
visiblity = gitlab.PrivateVisibility
visibility = gitlab.PrivateVisibility
} else if public, _ := cmd.Flags().GetBool("public"); public {
visiblity = gitlab.PublicVisibility
visibility = gitlab.PublicVisibility
}

tags, _ := cmd.Flags().GetStringArray("tag")
Expand All @@ -160,8 +160,8 @@ func runCreateProject(cmd *cobra.Command, args []string, f *cmdutils.Factory) er
InitializeWithReadme: gitlab.Bool(readme),
}

if visiblity != "" {
opts.Visibility = &visiblity
if visibility != "" {
opts.Visibility = &visibility
}

if namespaceID != 0 {
Expand Down
2 changes: 1 addition & 1 deletion commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func NewCmdRoot(f *cmdutils.Factory, version, buildDate string) *cobra.Command {

NO_COLOR: set to any value to avoid printing ANSI escape sequences for color output.

FORCE_HYPERLINKS: set to 1 to force hyperlinks to be output, even when not outputing to a TTY
FORCE_HYPERLINKS: set to 1 to force hyperlinks to be output, even when not outputting to a TTY

GLAB_CONFIG_DIR: set to a directory path to override the global configuration location
`),
Expand Down
2 changes: 1 addition & 1 deletion docs/source/mr/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Options

-A, --all Get all merge requests
-a, --assignee strings Get only merge requests assigned to users
--author string Fitler merge request by Author <username>
--author string Filter merge request by Author <username>
-c, --closed Get only closed merge requests
-d, --draft Filter by draft merge requests
-g, --group string Get MRs from group and it's subgroups
Expand Down
2 changes: 1 addition & 1 deletion internal/config/writefile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
func Test_WriteFile(t *testing.T) {
dir, err := ioutil.TempDir("", "")
if err != nil {
t.Skipf("unexpected error while creating temporay directory = %s", err)
t.Skipf("unexpected error while creating temporary directory = %s", err)
}
t.Cleanup(func() {
os.RemoveAll(dir)
Expand Down
2 changes: 1 addition & 1 deletion internal/glrepo/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (r *ResolvedRemotes) BaseRepo(interactive bool) (Interface, error) {
}
// Rewrite resolution, ignore the error as this will keep working
// in the future we might add a warning that we couldn't rewrite
// it for compatiblity
// it for compatibility
_ = git.SetRemoteResolution(r.Name, "base:"+r.Resolved)

return NewWithHost(repo.RepoOwner(), repo.RepoName(), r.RepoHost()), nil
Expand Down
2 changes: 1 addition & 1 deletion pkg/git/url_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestParseURL(t *testing.T) {
}
} else {
if err != nil {
t.Errorf("unexpcted error %s", err)
t.Errorf("unexpected error %s", err)
}
if u.Scheme != tt.want.Scheme {
t.Errorf("expected scheme %q, got %q", tt.want.Scheme, u.Scheme)
Expand Down
2 changes: 1 addition & 1 deletion pkg/tableprinter/table_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ type TableCell struct {

type TableRow struct {
Cells []*TableCell
// Separator is the seperator for columns in the table. Default is " "
// Separator is the separator for columns in the table. Default is " "
Separator string
}

Expand Down