its-danny / koji Goto Github PK
View Code? Open in Web Editor NEW🦊 An interactive CLI for creating conventional commits.
License: MIT License
🦊 An interactive CLI for creating conventional commits.
License: MIT License
Describe the bug
Running Koji with a hook installed by cocogitto results in the error:
Error: failed to parse config cause unknown field 'git_hooks', expected one of 'from_latest_tag', 'ignore_merge_commits', 'monorepo_version_separator', 'branch_whitelist', 'tag_prefix', 'pre_bump_hooks', 'post_bump_hooks', 'pre_package_bump_hooks', 'post_package_bump_hooks', 'commit_types', 'changelog', 'bump_profiles', 'packages'
To Reproduce
create a cog.toml with the following content:
[git_hooks.commit-msg]
script = """#!/bin/bash
set -e
cog verify --file ${1}
"""
run
cog install-hook --all
in the same repo run koji
Expected behavior
koji commits the message and cog verify passes.
Additional context
I have no idea if this is a cocogitto issue or a koji issue. Committing without koji works fine.
Is your feature request related to a problem? Please describe.
If I want to use koji
directly (rather than via commit hook), then I must specify -a
and -e
every time I run it.
I'd prefer to be able to put this into the config file as a default and then have --no-autocomplete
and --no-emoji
if I need an override for the config.
(flags should always take precedence over config)
gotta wait for it to release first tho
Error: Not a directory (os error 20)
Describe the bug
If you're working directory is a git submodule, then .git
will be a text file with the parameter gitdir
acting as a (sym)link to the real module directory.
.git
:
gitdir: ../.git/modules/installers
app@beta ~/project> git commit
✔ What type of change are you committing? · docs
✔ What is the scope of this change? (press enter to skip) · koji
✔ Write a short, imperative tense description of the change. · update docs for webi users as target audience
✔ Provide a longer description of the change. (press enter to skip) ·
✔ Are there any breaking changes? · No
✔ Does this change affect any open issues? · No
Error: Not a directory (os error 20)
koji -c/--config my-config.toml
atm a custom commit type looks like this:
[[commit_types]]
name = "feat"
emoji = "✨"
description = "A new feature"
it should support not having the emoji
line, since not everyone wants emoji in their commit messages.
meta/config/koji-default.toml
meta/config/koji-gitmoji.toml
- https://github.com/carloscuesta/gitmoji-cliHey @its-danny I am writing docs for cocogitto's next release, I was wondering, what tool did you use to make the video on koji's readme ?
Is your feature request related to a problem? Please describe.
I don't write breaking changes and issues, so I want it not to ask me for them.
Describe the solution you'd like
Set on the config file like this.
breaking_change = false
issues = false
Describe alternatives you've considered
Pass these options to ignore them.
koji --no-breaking-change --no-issues
requires this release to be done: https://github.com/oknozor/cocogitto/projects/1
pr that adds the functionality i need: cocogitto/cocogitto#131
same as similar tools, this would be ran as a prepare-commit-msg
hook. koji --hook
.
Describe the bug
I've got koji set up as a git hook:
.git/modules/installers/hooks/prepare-commit-msg
#!/bin/bash
koji --hook
When I run git commit -m "some description"
, it does not use the description that I gave:
app@beta ~/project> git commit -m "blah blah blah"
✔ What type of change are you committing? · feat
✔ What is the scope of this change? (press enter to skip) ·
? Write a short, imperative tense description of the change. ›
Expected behavior
When I run git commit -m "some description"
, koji should pre-populate the message with some description
.
Ideally, I would like to be able to use git commit -m "feature(thing): something nice"
or git commit -m "doc: more words"
and koji suggest a fix for my spelling mistake, such as feat
or docs
.
Describe the bug
koji --version
Error: could not find repository from '/Users/aj'; class=Repository (6); code=NotFound (-3)
Expected behavior
Should be able to print version from any directory, not just from project directories with a .git
.
Describe the bug
Fails to build.
To Reproduce
cargo +nightly install-update koji
Updating registry 'https://github.com/rust-lang/crates.io-index'
Package Installed Latest Needs update
koji v1.5.1 v1.5.2 Yes
Updating koji
...snip...
Compiling cocogitto v5.2.0
Compiling koji v1.5.2
error[E0061]: this function takes 7 arguments but 6 arguments were supplied
--> /Users/berkus/.cargo/registry/src/github.com-1ecc6299db9ec823/koji-1.5.2/src/lib/commit.rs:43:15
|
43 | cocogitto.conventional_commit(&commit_type, scope, summary, body, None, is_breaking_change)?;
| ^^^^^^^^^^^^^^^^^^^-------------------------------------------------------------- an argument of type `bool` is missing
|
note: associated function defined here
--> /Users/berkus/.cargo/registry/src/github.com-1ecc6299db9ec823/cocogitto-5.2.0/src/lib.rs:364:12
|
364 | pub fn conventional_commit(
| ^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
43 | cocogitto.conventional_commit(&commit_type, scope, summary, body, None, is_breaking_change, /* bool */)?;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expected behavior
Builds.
Screenshots
N/A
Additional context
N/A
Hey,
I had 1.2.0 installed and there was a windows version but after that version you changed the publish process and you don't built windows anymore.
Is there a limitation or something like that, why you don't provide it anymore.
Is your feature request related to a problem? Please describe.
Hi, I really like your work on this project so far, but there's one thing that keeps me from using it regularly: It doesn't take the custom commit types I've configured in cog.toml
, the configuration file from cocogitto, but requires another config file, with often the exact same entries.
Describe the solution you'd like
I'd like koji to parse the custom commit types I configured in cog.toml
, perhaps specified through a configuration option (like "parse custom commit types from the cog.toml
in the current repository if available").
Describe alternatives you've considered
None.
Additional context
Obviously, the description that's configurable through kojis configuration file would be missing from the commit types declared in cog.toml
. I thought of 3 ways to solve this. The first one is to just use the changelog_title
property which should be available on every declared commit type. The second one is to omit it all together and just have it say "Custom type declared in cog.toml
" or similar. The last one, which can be used together with the first two proposals, is to advice users to add a description
(or similarly named) property to their commit types, which would just be ignored by cocogitto but could be used by koji.
As it's currently not possible to remove a commit type in cocogitto, the current descriptions in koji can still be re-used in my opinion, only non-standard custom commit types would need to be handled differently.
Edit: I opened a PR on cocogitto to allow disabling default commit types. If this is ever implemented, koji should also allow disabling commit types in the same way as cocogitto, provided that this PR will be implemented until then. cocogitto/cocogitto#386
everything in src/lib/
has decent test coverage. src/bin/main.rs
has no tests at all because i'm not really sure how to test it. it basically comes down to figuring out how to test requestty since that's all it's doing.
so you can do: add more tests :pinched_fingers:
and it becomes: add more tests 🤌
the only things that need to support this are probably scope
, summary
, and body
.
Describe the bug
The hash character #
cannot be entered.
To Reproduce
Run koji
and try to enter the hash character #
, either directly by typing or by copy/paste.
Additional context
I'm on Windows 10, I tried both with Git Bash and Powershell.
Describe the bug
The koji tool fails to run on the latest macOS. This is possibly due to dependency on OpenSSLv3.
To Reproduce
Install Koji using the following command in the terminal:
curl -sS https://webinstall.dev/koji | bash
Run koji:
koji
This problem occurs even if the release is directly downloaded from Github release page.
Expected behavior
Koji should run
Screenshots
dyld[54780]: Library not loaded: /usr/local/opt/openssl@3/lib/libssl.3.dylib
Referenced from: ~/.local/opt/koji-v1.4.0/bin/koji
Reason: tried: '/usr/local/opt/openssl@3/lib/libssl.3.dylib' (no such file), '/usr/local/lib/libssl.3.dylib' (no such file), '/usr/lib/libssl.3.dylib' (no such file)
[1] 54780 abort koji
Additional context
On macOS openssl version
yields the following:
LibreSSL 2.8.3
this will just pass-thru to cocogitto. can be a --sign
flag or added to koji.toml
.
Describe the bug
When running Koji in a sub module, the following error occurs:
Error: Not a directory (os error 20)
To Reproduce
Enter a sub module and run koji
Expected behavior
Koji commits to the sub module
Once the above is merged, update README with:
curl -sS https://webinstall.dev/koji | bash
Is your feature request related to a problem? Please describe.
Currently when I use koji my only option to select text is to use the arrow keys. 😢
Describe the solution you'd like
If I start typing, let's say f
, then feat
should be selected. Or if I type d
, then docs
should be selected.
Describe the bug
Fails to build with latest cocogitto:
Compiling cocogitto v6.1.0
Compiling koji v2.2.0
error[E0061]: this method takes 1 argument but 7 arguments were supplied
--> /Users/berkus/.cargo/registry/src/index.crates.io-6f17d22bba15001f/koji-2.2.0/src/lib/commit.rs:44:15
|
44 | cocogitto.conventional_commit(
| ^^^^^^^^^^^^^^^^^^^
45 | &commit_type,
| ------------ expected `CommitOptions<'_>`, found `&String`
|
note: method defined here
--> /Users/berkus/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cocogitto-6.1.0/src/command/commit.rs:24:12
|
24 | pub fn conventional_commit(&self, opts: CommitOptions) -> Result<()> {
| ^^^^^^^^^^^^^^^^^^^
help: remove the extra arguments
|
45 - &commit_type,
45 + /* CommitOptions<'_> */,
|
For more information about this error, try `rustc --explain E0061`.
error: could not compile `koji` (lib) due to 1 previous error
To Reproduce
cargo +nightly install koji
Expected behavior
Koji should install.
Additional context
Not sure when cocogitto changed this interface, but it seems like they broke API between 6.0 and 6.1. Koji should probably depend strictly on 6.0 or upgrade the dep to 6.1.
e.g. koji-linux-amd64-1.1.3.tar.gz
i have no idea how to do this and tbh github actions are beyond me, i just copy/paste things and hope they work.
Is your feature request related to a problem? Please describe.
Most config files for tooling begin with .
and end in rc.<ext>
:
I would prefer that koji.toml
follow this convention.
Most tools allow for a top-level config file in ~/.config/<name>/config.<ext>
.
It would be great if koji would do this as a fallback.
For example, if I don't have a local .kojirc.toml
in my git directory, but I have one in ~/.config/koji/config.toml
, then that should be used instead.
config file needs to change to accept a scopes
array. on first run (with --autocomplete
), save the found scopes to the config via appending it. this allows the user to set up their own list when starting a fresh repo, while also populating it with new ones. every time you commit with koji, the list should be updated.
for this to work, commit_types
needs to work differently. when we load a config, we need to check for commit_types
and use the default if they don't exist. currently we only use the default if a config file doesn't exist at all.
this sounds like the correct
thing to do, but i'm no totally sure it's necessary. autocomplete is an optional flag, and in a large repo it only slows startup down by milliseconds.
Describe the bug
When I run koji
, it requires GPG
.
thread 'main' panicked at 'error calling gpg command, is gpg installed ?: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/cocogitto-5.2.0/src/git/commit.rs:86:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
To Reproduce
To run the command on a machine doesn't have GPG.
Expected behavior
Ignore GPG if not installed.
Additional context
Is it not an issue of koji, but of cocogitto?
I usually sign off commits with SSH not GPG.
i've never released anything there, so not sure how it works. but you should be able to use koji by having it as a dev dependency.
Is your feature request related to a problem? Please describe.
Presently koji
can add new commits, but it cannot amend the last commit.
Describe the solution you'd like
koji --amend
should amend the last commit.
Additional context
Each question should be pre-filled with the information coming from the last commit.
The breaking change prompt currently adds the !
symbol to the first line of the commit as expected.
A BREAKING CHANGE footer is optional within the spec, and I wonder if this could also be included within the prompt. Though this might require a different behaviour from the relevant prompt,
this could be nice to have. requestty supports it for the prompt. would just need to keep a list of scopes (in koji.toml
?) up to date. on first use, it could scan commit history and use conventional-commits-parser to get all the unique scopes.
A lot of issues were closed, so I'd like to do a new release. Main issue is the whole release flow is confusing and kind of busted, so I need to update that. Important part is that it creates releases for all platforms (and they work).
Also need to clean the README up to be easier to read and less scattered.
Afterwards, open a PR at webinstall to update the koji installer (+ README).
assuming it's being ran in a git repo, we could show the author in the output and let you filter via author email.
finn -a "[email protected]"
There doesn't appear to be any way to insert a line break within a long-form comment? Is there some key combination I'm missing (noting that I'm on a Mac so this could be part of the issue) or is this not possible? If not possible then could it be added somehow?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.