Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add help_text argument to knope.toml#workflows #959

Closed
alex-way opened this issue Mar 21, 2024 · 0 comments · Fixed by #960
Closed

Feature: Add help_text argument to knope.toml#workflows #959

alex-way opened this issue Mar 21, 2024 · 0 comments · Fixed by #960

Comments

@alex-way
Copy link
Contributor

I think it could be really useful to provide a short description of the workflow command in the --help command for what the workflow is responsible for:

A command line tool for automating common development tasks

Usage: knope [OPTIONS] [COMMAND]

Commands:
  prepare-release  Prepare a release
  release                Release the software
  help                    Print this message or the help of the given subcommand(s)

Options:
      --dry-run   Pretend to run a workflow, outputting what _would_ happen without actually doing it.
  -v, --verbose   Print extra information (for debugging)
      --upgrade   Upgrade to the latest `knope.toml` syntax from any deprecated (but still supported) syntax.
      --validate  Check that the `knope.toml` file is valid.
  -h, --help      Print help
  -V, --version   Print version

I've already got the changes ready and will submit a PR shortly with the changes

github-merge-queue bot pushed a commit that referenced this issue Mar 21, 2024
Closes #959 

This change allows users to specify a `help_text` for a workflow in
their `knope.toml` file within the `[[workflows]]` section.

Example:

```toml
[[workflows]]
name = "release"
help_text = "Prepare a release"
```

When running `knope --help`, this will be displayed:

```text
A command line tool for automating common development tasks

Usage: knope [OPTIONS] [COMMAND]

Commands:
  prepare-release
  release          Prepare a release
  document-change
  pwd
  help             Print this message or the help of the given subcommand(s)

Options:
      --dry-run   Pretend to run a workflow, outputting what _would_ happen without actually doing it.
  -v, --verbose   Print extra information (for debugging)
      --upgrade   Upgrade to the latest `knope.toml` syntax from any deprecated (but still supported) syntax.
      --validate  Check that the `knope.toml` file is valid.
  -h, --help      Print help
  -V, --version   Print version
```

I've not updated the default generated `knope.toml` file, but I can
easily add some default help text if we want to document the default
workflows/subcommands.

---------

Co-authored-by: Dylan Anthony <43723790+dbanty@users.noreply.github.com>
dbanty added a commit that referenced this issue Mar 24, 2024
This PR was created by Knope. Merging it will create a new release

### Features

#### Add `help_text` option to workflows

`[[workflows]]` can now have `help_text`:

Example:

```toml
[[workflows]]
name = "release"
help_text = "Prepare a release"
```

The message is displayed when running `knope --help`:

```text
A command line tool for automating common development tasks

Usage: knope [OPTIONS] [COMMAND]

Commands:
  release          Prepare a release
  help             Print this message or the help of the given subcommand(s)

...
```

PR #960 closes issue #959. Thanks @alex-way!

#### Use bullets to describe simple changes

The previous changelog & forge release format used headers for the
summary of all changes, these entries were hard
to follow for simple changes like this:

```markdown
### Features

#### A feature

#### Another header with no content in between?
```

Now, _simple_ changes are described with bullets at the _top_ of the
section. More complex changes will come after
any bullets, using the previous format:

```markdown
### Features

- A simple feature
- Another simple feature

#### A complex feature

Some details about that feature
```

Right now, a simple change is any change which comes from a conventional
commit (whether from the commit summary or
from a footer) _or_ a changeset with only a header in it. Here are three
simple changes:

```
feat: A simple feature

Changelog-Note: A note entry
```

```markdown
---
default: minor
---

# A simple feature with no description
```

A complex change is any changeset which has content (not just empty
lines) below the header.

PR #969 implemented #930. Thanks for the suggestion @ematipico!

Co-authored-by: GitHub <github-actions@github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant