diff --git a/DOCS.md b/DOCS.md index 09c6ef7d..c429324b 100644 --- a/DOCS.md +++ b/DOCS.md @@ -77,7 +77,7 @@ Add a new deployment from the provided configuration **--parameter, -p**="": provide the parameter(s) within `key=value` format for the deployment -**--ref**="": provide the reference to deploy - this can be a branch, commit (SHA) or tag (default: refs/heads/master) +**--ref**="": provide the reference to deploy - this can be a branch, commit (SHA) or tag (default: refs/heads/main) **--repo, -r**="": provide the repository for the deployment @@ -91,7 +91,7 @@ Add a new repository from the provided configuration **--active, -a**="": current status of the repository (default: true) -**--branch, -b**="": default branch for the repository (default: master) +**--branch, -b**="": default branch for the repository (default: main) **--clone, -c**="": full clone URL to repository in source control @@ -183,7 +183,7 @@ Compile the provided pipeline **--output, --op**="": format the output in json, spew or yaml (default: yaml) -**--ref**="": provide the repository reference for the pipeline (default: master) +**--ref**="": provide the repository reference for the pipeline (default: main) **--repo, -r**="": provide the repository for the pipeline @@ -213,7 +213,7 @@ Expand the provided pipeline **--output, --op**="": format the output in json, spew or yaml (default: yaml) -**--ref**="": provide the repository reference for the pipeline (default: master) +**--ref**="": provide the repository reference for the pipeline (default: main) **--repo, -r**="": provide the repository for the pipeline @@ -511,7 +511,7 @@ Update a new repository from the provided configuration **--active, -a**="": current status of the repository (default: true) -**--branch, -b**="": default branch for the repository (default: master) +**--branch, -b**="": default branch for the repository (default: main) **--clone, -c**="": full clone URL to repository in source control @@ -575,7 +575,7 @@ Validate a Vela pipeline **--path, -p**="": provide the path to the file for the pipeline -**--ref**="": provide the repository reference for the pipeline (default: master) +**--ref**="": provide the repository reference for the pipeline (default: main) **--repo, -r**="": provide the repository for the pipeline @@ -649,7 +649,7 @@ View details of the provided pipeline **--output, --op**="": format the output in json, spew or yaml (default: yaml) -**--ref**="": provide the repository reference for the pipeline (default: master) +**--ref**="": provide the repository reference for the pipeline (default: main) **--repo, -r**="": provide the repository for the pipeline diff --git a/action/build/get_test.go b/action/build/get_test.go index 1961b783..da96083c 100644 --- a/action/build/get_test.go +++ b/action/build/get_test.go @@ -46,7 +46,7 @@ func TestBuild_Config_Get(t *testing.T) { Action: "get", Org: "github", Repo: "octocat", - Branch: "master", + Branch: "main", Page: 1, PerPage: 10, Output: "dump", diff --git a/action/build/table_test.go b/action/build/table_test.go index 6abe15c0..9736ef55 100644 --- a/action/build/table_test.go +++ b/action/build/table_test.go @@ -122,8 +122,8 @@ func testBuild() *library.Build { b.SetAuthor("OctoKitty") b.SetEmail("OctoKitty@github.com") b.SetLink("https://example.company.com/github/octocat/1") - b.SetBranch("master") - b.SetRef("refs/heads/master") + b.SetBranch("main") + b.SetRef("refs/heads/main") b.SetBaseRef("") b.SetHost("example.company.com") b.SetRuntime("docker") diff --git a/action/deployment/add_test.go b/action/deployment/add_test.go index df959545..b3212d7e 100644 --- a/action/deployment/add_test.go +++ b/action/deployment/add_test.go @@ -34,7 +34,7 @@ func TestDeployment_Config_Add(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "", @@ -47,7 +47,7 @@ func TestDeployment_Config_Add(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "dump", @@ -60,7 +60,7 @@ func TestDeployment_Config_Add(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "json", @@ -73,7 +73,7 @@ func TestDeployment_Config_Add(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "spew", @@ -86,7 +86,7 @@ func TestDeployment_Config_Add(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "yaml", @@ -100,7 +100,7 @@ func TestDeployment_Config_Add(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "yaml", diff --git a/action/deployment/table_test.go b/action/deployment/table_test.go index 62971350..aee3c1ec 100644 --- a/action/deployment/table_test.go +++ b/action/deployment/table_test.go @@ -98,7 +98,7 @@ func testDeployment() *library.Deployment { d.SetURL("https://api.github.com/repos/github/octocat/deployments/1") d.SetUser("octocat") d.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135163") - d.SetRef("refs/heads/master") + d.SetRef("refs/heads/main") d.SetTask("vela-deploy") d.SetTarget("production") d.SetDescription("Deployment request from Vela") diff --git a/action/deployment/validate_test.go b/action/deployment/validate_test.go index 527bbc47..146b1e65 100644 --- a/action/deployment/validate_test.go +++ b/action/deployment/validate_test.go @@ -19,7 +19,7 @@ func TestDeployment_Config_Validate(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Target: "production", Task: "deploy:vela", Output: "", @@ -65,7 +65,7 @@ func TestDeployment_Config_Validate(t *testing.T) { Org: "github", Repo: "octocat", Description: "Deployment request from Vela", - Ref: "refs/heads/master", + Ref: "refs/heads/main", Task: "deploy:vela", Output: "", }, diff --git a/action/hook/table_test.go b/action/hook/table_test.go index e70ade0d..635e4f45 100644 --- a/action/hook/table_test.go +++ b/action/hook/table_test.go @@ -102,7 +102,7 @@ func testHook() *library.Hook { h.SetCreated(time.Now().UTC().Unix()) h.SetHost("github.com") h.SetEvent("push") - h.SetBranch("master") + h.SetBranch("main") h.SetError("") h.SetStatus("success") h.SetLink("https://github.com/github/octocat/settings/hooks/1") diff --git a/action/pipeline/table_test.go b/action/pipeline/table_test.go index 842d4e4e..5d7334f1 100644 --- a/action/pipeline/table_test.go +++ b/action/pipeline/table_test.go @@ -106,7 +106,7 @@ func testPipeline() *library.Pipeline { p.SetCommit("48afb5bdc41ad69bf22588491333f7cf71135163") p.SetFlavor("large") p.SetPlatform("docker") - p.SetRef("refs/heads/master") + p.SetRef("refs/heads/main") p.SetRef("yaml") p.SetVersion("1") p.SetExternalSecrets(false) diff --git a/action/repo/add_test.go b/action/repo/add_test.go index 44fa8590..cce76c5d 100644 --- a/action/repo/add_test.go +++ b/action/repo/add_test.go @@ -34,7 +34,7 @@ func TestRepo_Config_Add(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Counter: 0, @@ -55,7 +55,7 @@ func TestRepo_Config_Add(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Counter: 0, @@ -76,7 +76,7 @@ func TestRepo_Config_Add(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", @@ -96,7 +96,7 @@ func TestRepo_Config_Add(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Counter: 0, @@ -117,7 +117,7 @@ func TestRepo_Config_Add(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Counter: 0, diff --git a/action/repo/table_test.go b/action/repo/table_test.go index 217bb458..c3748b1d 100644 --- a/action/repo/table_test.go +++ b/action/repo/table_test.go @@ -107,7 +107,7 @@ func testRepo() *library.Repo { r.SetFullName("github/octocat") r.SetLink("https://github.com/github/octocat") r.SetClone("https://github.com/github/octocat.git") - r.SetBranch("master") + r.SetBranch("main") r.SetTimeout(30) r.SetVisibility("public") r.SetPrivate(false) diff --git a/action/repo/update_test.go b/action/repo/update_test.go index 5b9c2cd2..a793eae7 100644 --- a/action/repo/update_test.go +++ b/action/repo/update_test.go @@ -34,7 +34,7 @@ func TestRepo_Config_Update(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", @@ -54,7 +54,7 @@ func TestRepo_Config_Update(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", @@ -74,7 +74,7 @@ func TestRepo_Config_Update(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", @@ -94,7 +94,7 @@ func TestRepo_Config_Update(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", @@ -114,7 +114,7 @@ func TestRepo_Config_Update(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", @@ -134,7 +134,7 @@ func TestRepo_Config_Update(t *testing.T) { Name: "not-found", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", BuildLimit: 10, Timeout: 60, Visibility: "public", diff --git a/action/repo/validate_test.go b/action/repo/validate_test.go index 6481413e..56c3321a 100644 --- a/action/repo/validate_test.go +++ b/action/repo/validate_test.go @@ -20,7 +20,7 @@ func TestRepo_Config_Validate(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", Timeout: 60, Visibility: "public", Private: false, @@ -75,7 +75,7 @@ func TestRepo_Config_Validate(t *testing.T) { Name: "octocat", Link: "https://github.com/github/octocat", Clone: "https://github.com/github/octocat.git", - Branch: "master", + Branch: "main", Timeout: 60, Visibility: "public", Private: false, diff --git a/command/pipeline/compile.go b/command/pipeline/compile.go index 22020b7a..160b5fd2 100644 --- a/command/pipeline/compile.go +++ b/command/pipeline/compile.go @@ -53,7 +53,7 @@ var CommandCompile = &cli.Command{ EnvVars: []string{"VELA_REF", "PIPELINE_REF"}, Name: "ref", Usage: "provide the repository reference for the pipeline", - Value: "master", + Value: "main", }, }, CustomHelpTemplate: fmt.Sprintf(`%s diff --git a/command/pipeline/exec.go b/command/pipeline/exec.go index 9406223c..5f0b4650 100644 --- a/command/pipeline/exec.go +++ b/command/pipeline/exec.go @@ -131,7 +131,7 @@ EXAMPLES: 3. Execute a local Vela pipeline in a specific directory. $ {{.HelpName}} --path /absolute/full/path/to/dir --file .vela.local.yml 4. Execute a local Vela pipeline with ruleset information. - $ {{.HelpName}} --branch master --event push + $ {{.HelpName}} --branch main --event push 5. Execute a local Vela pipeline with a read-only local volume. $ {{.HelpName}} --volume /tmp/foo.txt:/tmp/foo.txt:ro 6. Execute a local Vela pipeline with a writeable local volume. diff --git a/command/pipeline/expand.go b/command/pipeline/expand.go index 23d6392a..698762bd 100644 --- a/command/pipeline/expand.go +++ b/command/pipeline/expand.go @@ -53,7 +53,7 @@ var CommandExpand = &cli.Command{ EnvVars: []string{"VELA_REF", "PIPELINE_REF"}, Name: "ref", Usage: "provide the repository reference for the pipeline", - Value: "master", + Value: "main", }, }, CustomHelpTemplate: fmt.Sprintf(`%s diff --git a/command/pipeline/validate.go b/command/pipeline/validate.go index 8c7163cb..5da71410 100644 --- a/command/pipeline/validate.go +++ b/command/pipeline/validate.go @@ -67,7 +67,7 @@ var CommandValidate = &cli.Command{ EnvVars: []string{"VELA_REF", "PIPELINE_REF"}, Name: "ref", Usage: "provide the repository reference for the pipeline", - Value: "master", + Value: "main", }, &cli.BoolFlag{ EnvVars: []string{"VELA_TEMPLATE", "PIPELINE_TEMPLATE"}, diff --git a/command/repo/add.go b/command/repo/add.go index 3d0b6fe0..b70233a2 100644 --- a/command/repo/add.go +++ b/command/repo/add.go @@ -43,7 +43,7 @@ var CommandAdd = &cli.Command{ Name: "branch", Aliases: []string{"b"}, Usage: "default branch for the repository", - Value: "master", + Value: "main", }, &cli.StringFlag{ EnvVars: []string{"VELA_LINK", "REPO_LINK"}, diff --git a/command/repo/update.go b/command/repo/update.go index 3251bd02..f81317f6 100644 --- a/command/repo/update.go +++ b/command/repo/update.go @@ -43,7 +43,7 @@ var CommandUpdate = &cli.Command{ Name: "branch", Aliases: []string{"b"}, Usage: "default branch for the repository", - Value: "master", + Value: "main", }, &cli.StringFlag{ EnvVars: []string{"VELA_LINK", "REPO_LINK"},