Skip to content

Commit

Permalink
Switch git_helper config file to git-helper (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmahsax authored Sep 15, 2023
1 parent 95bc946 commit 966ab6d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ git-helper setup

This will give you the option to set up credentials at GitHub and/or GitLab, as well as give you the choice to set up Git Helper as a plugin or not (see below).

The final result will be a `~/.git_helper/config.yml` file with the contents in this form:
The final result will be a `~/.git-helper/config.yml` file with the contents in this form:

```
github_user: GITHUB-USERNAME
Expand Down Expand Up @@ -151,7 +151,7 @@ git-helper clean-branches

### `code-request`

This command can be used to handily make new GitHub/GitLab pull/merge requests from the command-line. The command uses either the [GitHub REST API](https://docs.github.com/en/rest) or [GitLab API](https://docs.gitlab.com/ee/api/) to do this, so make sure you have a `~/.git_helper/config.yml` file set up in the home directory of your computer (instructions are higher in this `README`).
This command can be used to handily make new GitHub/GitLab pull/merge requests from the command-line. The command uses either the [GitHub REST API](https://docs.github.com/en/rest) or [GitLab API](https://docs.gitlab.com/ee/api/) to do this, so make sure you have a `~/.git-helper/config.yml` file set up in the home directory of your computer (instructions are higher in this `README`).

After setup is complete, you can call the command like this:

Expand Down Expand Up @@ -246,7 +246,7 @@ git-helper version
```bash
git-helper version
```
4. Run the setup command (optional for Beta modes, required when out of Beta):
4. Run the setup command (optional for Beta modes < 1.0.0, required otherwise):
```bash
git-helper setup
```
Expand Down
6 changes: 3 additions & 3 deletions cmd/setup/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func NewCommand() *cobra.Command {

cmd := &cobra.Command{
Use: "setup",
Short: "Creates a Git Helper config file at ~/.git_helper/config.yml",
Short: "Creates a Git Helper config file at ~/.git-helper/config.yml",
Args: cobra.ExactArgs(0),
DisableFlagsInUseLine: true,
RunE: func(cmd *cobra.Command, args []string) error {
Expand Down Expand Up @@ -201,7 +201,7 @@ func (s *Setup) createOrUpdatePlugins() {
}

fmt.Printf("\nDone setting up plugins at %s!\n", pluginsDir)
fmt.Printf("\nNow add this line to your Unix shell file (e.g. ~/.zshrc):\n export PATH=\"$HOME/.git_helper/plugins:$PATH\"\n")
fmt.Printf("\nNow add this line to your Unix shell file (e.g. ~/.zshrc):\n export PATH=\"$HOME/.git-helper/plugins:$PATH\"\n")
}

func (s *Setup) setupCompletion() {
Expand Down Expand Up @@ -252,6 +252,6 @@ func (s *Setup) setupCompletion() {
}
}

fmt.Println("\nCompletions (for bash, fish, powershell, and zsh) generated in " + completionsDir + ". Please activate the proper completion for your Unix shell. E.g. add the following to your ~/.zshrc file:\n [ -f ~/.git_helper/completions/completion.zsh ] && source ~/.git_helper/completions/completion.zsh\n")
fmt.Println("\nCompletions (for bash, fish, powershell, and zsh) generated in " + completionsDir + ". Please activate the proper completion for your Unix shell. E.g. add the following to your ~/.zshrc file:\n [ -f ~/.git-helper/completions/completion.zsh ] && source ~/.git-helper/completions/completion.zsh\n")
}
}
2 changes: 1 addition & 1 deletion internal/configfile/configfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (cf *ConfigFile) ConfigDir() string {
return ""
}

return homeDir + "/.git_helper"
return homeDir + "/.git-helper"
}

func (cf *ConfigFile) ConfigDirExists() bool {
Expand Down
8 changes: 4 additions & 4 deletions internal/configfile/configfile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ func TestConfigDir(t *testing.T) {
cf := NewConfigFileClient(false)
output := cf.ConfigDir()

if output != home+"/.git_helper" {
t.Fatalf(`ConfigDir should be %s, not %s`, home+"/.git_helper", output)
if output != home+"/.git-helper" {
t.Fatalf(`ConfigDir should be %s, not %s`, home+"/.git-helper", output)
}
}

func TestConfigFile(t *testing.T) {
cf := NewConfigFileClient(false)
output := cf.ConfigFile()

if output != home+"/.git_helper/config.yml" {
t.Fatalf(`ConfigFile should be %s, not %s`, home+"/.git_helper/config.yml", output)
if output != home+"/.git-helper/config.yml" {
t.Fatalf(`ConfigFile should be %s, not %s`, home+"/.git-helper/config.yml", output)
}
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

var (
packageVersion = "beta-0.1.0"
packageVersion = "beta-1.0.0"
)

func main() {
Expand Down

0 comments on commit 966ab6d

Please sign in to comment.