Bug Reporting
=============

.. version-added:: 1.1.3

.. highlight:: text

The ``asyncutils bug`` command, which calls :func:`~asyncutils.cli.bug` under the hood, is used to assist ticket submission to the GitHub issue
tracker for :mod:`asyncutils`. It utilizes the GitHub issue form schema to grab environment information the bug report needs, such that you need
not enter them manually, making for better UX and easier debugging.

This is the help output for the bug report subcommand, as of asyncutils v1.2.4::

  usage: asyncutils bug [-v | -q] [-u SRC_URL] [-l [LOG_PATH]]
                        [-t [TRACEBACK_PATH]] [-n] [-e] [-P] [-p] [-i]
                        [-o [BROWSER]] [-?]
                        [title]

  This command will print a link to open a new issue on GitHub with pre-filled information detected from the environment to stdout
  and exit, or if --open is passed, the link is opened directly using the webbrowser module.

  positional arguments:
    title                 The title of the bug report. If not specified, the title will be left blank.

  options:
    -v, --verbose         Emit more output.
    -q, --quiet           Emit less output.
    -u, --src-url SRC_URL
                          The permalink to the source file the bug primarily concerns. Must be a proper URL that passes urllib.parse.urlsplit validation.
    -l, --log-path [LOG_PATH]
                          The filesystem path to the logs to include in the report.
    -t, --traceback-path [TRACEBACK_PATH]
                          The filesystem path to the traceback.
    -n, --no-prefill-env  Do not fill the context section of the bug report with the values of environment variables that may affect ``asyncutils``.
    -e, --ensure-filled   Ensure that all fillable fields are filled and fail if not.
    -P, --pastebin        Create a public paste.rs paste for each field with long content.
    -p, --print-on-fail   Print the link to the console and exit with code 1 if opening it in a browser fails.
    -i, --interactive     Prompt the user to enter missing fields interactively. Will also prompt for log and traceback if the corresponding options are passed but a value is not given.
    -o, --open [BROWSER]  Open the link in a browser instead of printing it to the console.
    -?, -h, --help        Print this help message and exit.

  Some text area fields cannot be filled here, since they expect longer responses and cannot be crammed into a link, which has hard character limits.

.. note:: Preview generated by scripts/generate.sh at 2026-09-06 14:24:58 UTC. DO NOT COMMIT.
