Skip to content

Add arguments to the /packit help command #3073

@betulependule

Description

@betulependule

As of now, Packit responds to the /packit help command in the comments of issues and PRs. It generates a response message containing the usage and a list of supported arguments.

However, it shows only top-level arguments available, so the user wouldn't be informed about sub-arguments such as the --commit sub-argument, which can be used following the copr-build argument like /packit copr-build --commit 123456.

The help command should support listing sub-argument. For example, the command to retrieving the sub-arguments of the copr-build job would be:

/packit help build

The implementation should be simple. The GitCommentHelpHandler would need to be editted. The format_help method can still be used, but it has to be called on the relevant parser object (the relevant sub-parser of the top-level parser). For example, the "copr-build" subparser would need to be retrieved in the case of sub-arguments relevant to /packit copr-build.

In case an argument doesn't support any sub-argument (for example rebuild-failed), Packit should still respond to /packit help rebuild-failed, but should make it clear to the user that there are no sub-arguments available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/generalNot tied to a specific areacomplexity/single-taskRegular task; should be done within daysgain/lowDoesn't bring much value to usersgood-first-issueGood for newcomersimpact/lowAffects only few of the userskind/featureA request, idea, or new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions