Skip to content

Commit

Permalink
feat(config): use main as default git branch (honeydipper#590)
Browse files Browse the repository at this point in the history
Fixes honeydipper#490

Also update allowed semantic commit types
  • Loading branch information
wyardley authored Mar 15, 2024
1 parent 16cd729 commit 7fc8762
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/check-semantic-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,13 @@ jobs:
with:
validateSingleCommit: true
scopes: |
config
core
drivers
pkg
deps
daemon
drivers
error
pkg
release
util
workflow
6 changes: 3 additions & 3 deletions configs/sample-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Honeydipper looks for a init.yaml in the root of every loaded repo.
# init.yaml can include other yaml files in the same repo, and it can
# also load other repos. While it is possible to fit everything into a
# single file, it is recommended to organzie your configurations into
# single file, it is recommended to organzie your configurations into
# smaller chunks in a way that each chunk contains only relevant
# settings.
#
Expand All @@ -24,13 +24,13 @@
# fully loaded. Circular dependency will cause system to crash at this
# moment. You can specify which branch to use for each repo, and which
# path to be used as root (the location of the init.yaml). By default,
# master branch will be used, and the root of the repo will be used.
# the "main" branch will be used, and the root of the repo will be used.
# Currently, ssh git repos, https repos and local file repos are
# supported.

repos:
- repo: file:///Users/chunhuang/tmp/rules
# branch: master
# branch: main
# path: /

# Includes
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ To load a repo other than the bootstrap repo, just put info in the `repos` secti
---
repos:
- repo: <git url to the repo>
branch: <optional, defaults to master>
branch: <optional, defaults to main>
path: <the location of the init.yaml, must starts with /, optional, defaults to />
keyFile: <deploy key used for cloning the repo, optional>
keyPassEnv: <an environment variable name containing the passphrase for the deploy key, optional>
Expand Down
2 changes: 1 addition & 1 deletion docs/howtos/reload_on_push.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ rules:
do:
if_match:
- git_repo: myorg/myconfig
git_ref: refs/heads/master
git_ref: refs/heads/main
call_workflow: reload
```
Your repository name and branch name may differ.
Expand Down
2 changes: 1 addition & 1 deletion internal/config/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (c *Repo) cloneFetchRepo() {
dipper.Logger.Fatalf("Unable to create subdirectory in %v", c.parent.WorkingDir)
}

branch := "master"
branch := "main"
if c.repo.Branch != "" {
branch = c.repo.Branch
}
Expand Down

0 comments on commit 7fc8762

Please sign in to comment.