Skip to content

Improve help message formatting and content#3070

Merged
centosinfra-prod-github-app[bot] merged 5 commits intopackit:mainfrom
betulependule:improve-help-message
Mar 24, 2026
Merged

Improve help message formatting and content#3070
centosinfra-prod-github-app[bot] merged 5 commits intopackit:mainfrom
betulependule:improve-help-message

Conversation

@betulependule
Copy link
Contributor

@betulependule betulependule commented Mar 23, 2026

This PR improves the formatting of the help message from this:

image

To this:

image

The epilog is removed from the code block and reformatted. Lines, which were previously too long, have been split across multiple lines. The job descriptions start now with lowercase characters and the help job description has been changed. The --help positinal argument has been removed and now the message correctly refers to the help command instead.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new utility function break_lines_in_text to improve the formatting of help messages by wrapping long lines. It also refactors the HELP_COMMENT_EPILOG constant and integrates the new line-breaking logic into the help message generation. While the overall goal of improving help message readability is positive, there are a few areas where the implementation could be more robust and consistent, particularly regarding line breaking for all parts of the message and the use of HTML entities for spacing.

@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app
Copy link
Contributor

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, definitely a great improvement.

In the future I'd love to see the output being 100% markdown but that would require custom argparse formatter which is definitely outside the scope of this PR.

The automatically generated help message (generated by `argparse`)
contains lines, which are way too long to fit in a comment box.
Reading the comment requires side scrolling, which is not idel.
This commit manually breaks up lines, which exceed the maximum
specified length where necessary. Descriptions of jobs have also
been split across multiple lines where needed.
The automatically generated description of the `help` command
starts with a lowercase character, so the other descriptions
shouldn't be capitalized either.
@centosinfra-prod-github-app
Copy link
Contributor

@betulependule betulependule changed the title Improve help message formatting Improve help message formatting and content Mar 24, 2026
@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app
Copy link
Contributor

Fix improper content of the help message listing the `help`
command as `--help`.
Previously, the link provided led to the general Packit docs.
@centosinfra-prod-github-app
Copy link
Contributor

@betulependule betulependule added the mergeit Merge via Zuul label Mar 24, 2026
@centosinfra-prod-github-app
Copy link
Contributor

@centosinfra-prod-github-app centosinfra-prod-github-app bot merged commit 9897e8e into packit:main Mar 24, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Packit pull requests Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergeit Merge via Zuul

Projects

Development

Successfully merging this pull request may close these issues.

3 participants