Giter VIP home page Giter VIP logo

go-gitmoji-cli's Introduction

go-gitmoji-cli's People

Contributors

andreasaugustin avatar dependabot[bot] avatar github-actions[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

go-gitmoji-cli's Issues

[Feat]: make all configuration options available with cli flags

Describe the feature

Currently you are able to configure the cli with a config file or environment variables.
normally one would expect to be able to configure the cli also with cli flags.

A map betweeen the cli options and configuration options would be nice to have.

Use Case

sometimes one like to use configuration options with cli flags, e.g. within CI tasks or when you want to try something out or you have an exceptional case.

Proposed Solution

use the viper pflag mapping https://gist.github.com/brianclements/841ea7bffdb01346392c

Acknowledgements

  • I may be able to implement this feature request

[Bug]: quotes when using hooks

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

when using the hook, the commit title has " around the message.
Super bad for tools like release-please

Expected Behavior

no quotes around the title

Current Behavior

when using the hook the message title has " around the title

Steps To Reproduce

mkdir tmp
cd tmp
git init
echo "foo" >> README.md
go-gitmoji-cli hooks init
git commit
# now do the commit with the message

Possible Solution

No response

Additional Information/Context

No response

go-gitmoji-cli Version

v0.5.0-alpha (724a1cd)

[Bug]: ctrl + C -> unexpected behaviour

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

In some scenarios one like to close the current session. Normally ctrl + C is doing such a thing in most tty.

But the current implementation will lead in most cases to next prompt

Expected Behavior

ctrl + C should terminate the go-gitmoji-cli session

Current Behavior

in most cases the next prompt will be opened.

Steps To Reproduce

  1. use config or commit cmd
  2. press ctrl + C
  3. next prompt will open

Possible Solution

check the keymap within the UI elements

Additional Information/Context

No response

go-gitmoji-cli Version

v0.1.0-pre-alpha

[Feat]: do not show gitmoji or type prompt if proper gitmoji or type is provided within `-m` message :sparkles:

Describe the feature

Currently the gitmoji and type list prompts are provided all the time.
users are able to provide the information with -m flag.
proposed solution is to not show the prompts when the needed information is already provided within the -m flag if valid.

Use Case

sometimes people already provide the information with the -m flag, e.g. (with hook) git commit -m "feat: :smile: (#56) my nice description".
currently the gitmoji and commit prompts are shown which is not necessary.

Proposed Solution

if valid information is provided, use the information (already parsed and available within code) if it is valid.

Acknowledgements

  • I may be able to implement this feature request

[Bug]: issue with hook when no message is provided

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

โ˜  go-gitmoji-cli [chore/docker_test] โšก  git commit -S                                                               
____ ____    ____ _ ___ _  _ ____  _ _    ____ _    _
| __ |  | __ | __ |  |  |\/| |  |  | | __ |    |    |
|__] |__|    |__] |  |  |  | |__| _| |    |___ |___ |
info: hooks called
info: run: [.git/COMMIT_EDITMSG merge]
info: hook commit message file .git/COMMIT_EDITMSG
fatal: issue reading and parsing the commit msg file the amount of messages is to low or to high

Expected Behavior

should not have an error

Current Behavior

does have an error

Steps To Reproduce

No response

Possible Solution

there is a check about the amount of messages provided available within the code.
This check needs to be adjusted.

Additional Information/Context

No response

go-gitmoji-cli Version

v0.2.8-alpha

Remark

Also need to check the hook commit message second message https://git-scm.com/docs/githooks

prepare-commit-msg
This hook is invoked by [git-commit[1]](https://git-scm.com/docs/git-commit) right after preparing the default log message, and before the editor is started.

It takes one to three parameters. The first is the name of the file that contains the commit log message. The second is the source of the commit message, and can be: message (if a -m or -F option was given); template (if a -t option was given or the configuration option commit.template is set); merge (if the commit is a merge or a .git/MERGE_MSG file exists); squash (if a .git/SQUASH_MSG file exists); or commit, followed by a commit object name (if a -c, -C or --amend option was given).

If the exit status is non-zero, git commit will abort.

The purpose of the hook is to edit the message file in place, and it is not suppressed by the --no-verify option. A non-zero exit means a failure of the hook and aborts the commit. It should not be used as replacement for pre-commit hook.

The sample prepare-commit-msg hook that comes with Git removes the help message found in the commented portion of the commit template.

[Bug]: tab tab completion does not work

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Currently the generated completion contains invalid characters

โ˜  ~  go-gitmoji-cli completion zsh                  
____ ____    ____ _ ___ _  _ ____  _ _    ____ _    _
| __ |  | __ | __ |  |  |\/| |  |  | | __ |    |    |
|__] |__|    |__] |  |  |  | |__| _| |    |___ |___ |
#compdef go-gitmoji-cli
compdef _go-gitmoji-cli go-gitmoji-cli

# zsh completion for go-gitmoji-cli                       -*- shell-script -*-

__go-gitmoji-cli_debug()
{
    local file="$BASH_COMP_DEBUG_FILE"

The figlet is breaking the functionality

Expected Behavior

completions must work

Current Behavior

The generated completion does not work

Steps To Reproduce

โ˜  ~  go-gitmoji-cli completion zsh > /tmp/completion 
โ˜  ~  source /tmp/completion                           
/tmp/completion:1: bad pattern: ^[[35m____

Possible Solution

Currently the figlet is created within the root init() function.
Somehow when caling go-gitmoji-cli completion zsh the figlet must not be called

Additional Information/Context

No response

go-gitmoji-cli Version

v0.1.0-alpha

[Feat]: add tests for the docker images after deployment

Describe the feature

Currently docker images are released and push to registries.
Those images should be tested after the release

Use Case

Check if the newly created images are valid

Proposed Solution

like in https://github.com/AndreasAugustin/actions-template-sync/blob/main/.github/workflows/push_docker.yml
us container structured tests

      -
        name: run tests
        run: |
          echo "Install container tools"
          curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 \
            && chmod +x container-structure-test-linux-amd64 \
            && sudo mv container-structure-test-linux-amd64 /usr/local/bin/container-structure-test
          echo "Run tests"
          container-structure-test test \
            --image ghcr.io/andreasaugustin/${{ matrix.variant }}:${{ steps.meta.outputs.version }} \
            --config src/test-config.yaml

Acknowledgements

  • I may be able to implement this feature request

[Bug]: issue with hooks -> file not found

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

when using the hook with a commit it reports an error

tmp [main] โšก  git commit -S -m "fix: :bug: (#39) fix issue with subcommand no auto help"
____ ____    ____ _ ___ _  _ ____  _ _    ____ _    _
| __ |  | __ | __ |  |  |\/| |  |  | | __ |    |    |
|__] |__|    |__] |  |  |  | |__| _| |    |___ |___ |
fatal: issue reading and parsing the commit msg file open .git/COMMIT_EDITMSG message: no such file or directory
โ˜  tmp [main] โšก  

Expected Behavior

no error using the hooks

Current Behavior

currently an error is reported no file found (but rile is existent in .git repository)

Steps To Reproduce

No response

Possible Solution

No response

Additional Information/Context

No response

go-gitmoji-cli Version

v0.2.7-alpha

[Bug]: released docker images do not contain the built binary

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The current built and released docker images do not contain the go-gitmoji-cli binary.

Expected Behavior

when running the images they must contain the binary

Current Behavior

Checking the build phase and the Dockerfile, the copy step has been forgotten

Steps To Reproduce

  1. pull one of the pushed docker images
  2. run the image
  3. it does not contain the binary

Possible Solution

put the copy step into the workflow

Additional Information/Context

No response

Template sync version Version

v0.1.0-pre-alpha

[Bug]: calling some cmds do not list the help when subcommands are available

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Some subcommands have subcommands.
Currently when calling the parent subcommand one would expect to get the help with a list of available subcommands.
But you get nothing.
Example:

โ˜  ~  go-gitmoji-cli list -d      
INFO[0000] Debug logs enabled                           
DEBU[0000] list called                                  
โ˜  ~  

Expected Behavior

you should get the help command for the subcommand.

Current Behavior

you get nothing

Steps To Reproduce

โ˜  ~  go-gitmoji-cli list -d      
INFO[0000] Debug logs enabled                           
DEBU[0000] list called                                  
โ˜  ~  

Possible Solution

Remove the empty run cmd within the related subcommands

var ListCmd = &cobra.Command{
	Use:   "list",
	Short: "List all the available gitmojis",
	Long:  fmt.Sprintf(`The list is queried from the api %s.`, pkg.DefaultGitmojiApiUrl),
	Run: func(cmd *cobra.Command, args []string) {
		log.Debug("list called")
	},
}

Additional Information/Context

No response

go-gitmoji-cli Version

v0.2.6-alpha

[Bug]: brew install is not working

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Currently the noted brew install command is not working with error

linuxbrew@c2d96618793d:~$ brew install https://github.com/AndreasAugustin/go-gitmoji-cli/Formula
Running `brew update --auto-update`...
==> Homebrew collects anonymous analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

Error: Non-checksummed download of Formula formula file from an arbitrary URL is unsupported! `brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap on GitHub instead.

Expected Behavior

brew install should work

Current Behavior

installation does not work

Steps To Reproduce

$ docker pull homebrew/brew`
$ docker run -it homebrew/brew:latest
$ brew install https://github.com/AndreasAugustin/go-gitmoji-cli/Formula
Running `brew update --auto-update`...
==> Homebrew collects anonymous analytics.
Read the analytics documentation (and how to opt-out) here:
  https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).

==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
  https://github.com/Homebrew/brew#donations

Error: Non-checksummed download of Formula formula file from an arbitrary URL is unsupported! `brew extract` or `brew create` and `brew tap-new` to create a formula file in a tap on GitHub instead.

Possible Solution

the release setup is broken

Additional Information/Context

Like #12 this is currently a testing version.
Need to be fixed.

go-gitmoji-cli Version

v0.1.0-pre-alpha

[Feat]: add `-m` and `-S` flags to commit command

Remark
-S flag has been implemented with #20

Describe the feature

Within git you are able to use -m and -S flags for the commit comand e.g.
git commit -S -m "feat(config): :rocket: (#20) map config with cmd options" -m "add a mapping between the config options and the commands"

would be nice if go-gitmoji-cli would also have those options.

Use Case

There is a hook available.
Sometimes people want to use the git commit command together with the hook. Therefore the message parts (type, scope, message, gitmoji) should be kept.

Also -S flag should be available to sign commits (sometimes this is not globally configured)

Proposed Solution

parse the messages and put the parts as initial values.

Acknowledgements

  • I may be able to implement this feature request

[Feat]: make it possible to use standard commit message on merge

Describe the feature

when the hook is enabled and doing a merge -> The cli is triggered with hook workflow asking for gitmoji and the other conventional gitmoji commit message parts.

Sometimes this is an unwanted behaviour (e.g. on merge). Therefore it should be possible to configure the merge behaviour.

Use Case

doing a merge -> use standard git merge message.

Proposed Solution

make it configurable to use the default git message.

Remark

Also check the hook commit message second message https://git-scm.com/docs/githooks
This might help

prepare-commit-msg
This hook is invoked by [git-commit[1]](https://git-scm.com/docs/git-commit) right after preparing the default log message, and before the editor is started.

It takes one to three parameters. The first is the name of the file that contains the commit log message. The second is the source of the commit message, and can be: message (if a -m or -F option was given); template (if a -t option was given or the configuration option commit.template is set); merge (if the commit is a merge or a .git/MERGE_MSG file exists); squash (if a .git/SQUASH_MSG file exists); or commit, followed by a commit object name (if a -c, -C or --amend option was given).

If the exit status is non-zero, git commit will abort.

The purpose of the hook is to edit the message file in place, and it is not suppressed by the --no-verify option. A non-zero exit means a failure of the hook and aborts the commit. It should not be used as replacement for pre-commit hook.

The sample prepare-commit-msg hook that comes with Git removes the help message found in the commented portion of the commit template.

Acknowledgements

  • I may be able to implement this feature request

[Bug]: error log -> .gitmojirc not found

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

When usting current version without having .gitmojirc file present a missleading error message is printed

โ˜  ~  go-gitmoji-cli config -g     
____ ____    ____ _ ___ _  _ ____  _ _    ____ _    _
| __ |  | __ | __ |  |  |\/| |  |  | | __ |    |    |
|__] |__|    |__] |  |  |  | |__| _| |    |___ |___ |
ERROR 2023/08/18 00:11:30 get config file: Config File ".gitmojirc" Not Found in "[/home/andy /home/andy/.config/go-gitmoji-cli]"
Gitmoji API url
 >https://gitmoji.dev/api/gitmojis 

[ Submit ]

โ˜  ~  

Expected Behavior

this error message is not expected

Current Behavior

no error message

Steps To Reproduce

No response

Possible Solution

No response

Additional Information/Context

No response

go-gitmoji-cli Version

v0.1.1-pre-alpha

[Bug]: creating release with release please action does not trigger goreleaser action

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Currently release please is used to create releases.
With new release goreleaser is used to deploy the go artifacts.

When manually creating a release this will trigger the goreleaser action but when the release is done with release please, the action is not triggered

Expected Behavior

when the release is created the goreleaser action should be triggered.

Current Behavior

the goreleaser action is not triggered

Steps To Reproduce

No response

Possible Solution

No response

Additional Information/Context

No response

go-gitmoji-cli Version

v0.2.7-alpha

[Feat]: add prompt with list for commit types

Describe the feature

Currently the commit types are free text.
Would be nice to have a list to choose from.

Use Case

types should be the same in a repo.
Therefore would be nice to have a list to choose from.

Proposed Solution

Have a list with available types and scopes which are shown after the gitmoji list.
Showing the list should be configurable.

As a predefined set of the items the list from angular or commitlint should be a nice start
https://gist.github.com/brianclements/841ea7bffdb01346392c
https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional

Acknowledgements

  • I may be able to implement this feature request

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.