docs: def get_stdin_data():
      """ Helper function that returns data send to stdin or False if nothing is send """
      # STDIN can only be 3 different types of things ("modes")
      #  1. An interactive terminal device (i.e. a TTY -> sys.stdin.isatty() or stat.S_ISCHR)
      #  2. A (named) pipe (stat.S_ISFIFO)
      #  3. A regular file (stat.S_ISREG)
      # Technically, STDIN can also be other device type like a named unix socket (stat.S_ISSOCK), but we don't
      # support that in gitlint (at least not today).
      #
      # Now, the behavior that we want is the following:
      # If someone sends something directly to gitlint via a pipe or a regular file, read it. If not, read from the
      # local repository.
      # Note that we don't care about whether STDIN is a TTY or not, we only care whether data is via a pipe or regular
      # file.
      # However, in case STDIN is not a TTY, it HAS to be one of the 2 other things (pipe or regular file), even if
      # no-one is actually sending anything to gitlint over them. In this case, we still want to read from the local
      # repository.
      # To support this use-case (which is common in CI runners such as Jenkins and Gitlab), we need to actually attempt
      # to read from STDIN in case it's a pipe or regular file. In case that fails, then we'll fall back to reading
      # from the local repo.
  
      mode = os.fstat(sys.stdin.fileno()).st_mode
      stdin_is_pipe_or_file = stat.S_ISFIFO(mode) or stat.S_ISREG(mode)
      if stdin_is_pipe_or_file:
          input_data = sys.stdin.read()
          # Only return the input data if there's actually something passed
          # i.e. don't consider empty piped data
          if input_data:
              return ustr(input_data)
      return False