package crs

  1. Overview
  2. Docs
A tool for managing inline review comments embedded in source code

Install

dune-project
 Dependency

Authors

Maintainers

Sources

crs-0.0.20260307.tbz
sha256=77f77c61e908a6716fa876f5648f662ffaf7e24be4a7889fd6b53121592311bb
sha512=5fc6252650571c4127ebb1e61fecf78c5d4ce35e2832dff47125cda1448e07ea6d4da5e3a9a28643e3491d3594b0ee8857214241f98bd0296ada2c35ea8daa4b

doc/crs.cr-comment/Cr_comment/User_handle/index.html

Module Cr_comment.User_handleSource

A user handle as it appears in CR comments and related metadata (such as pull request author).

This type is more permissive than a git username Vcs.User_handle.t, in order to capture certain usages across platforms such as GitHub, GitLab, etc. For example, square brackets are allowed to accommodate bot account names on GitHub (e.g., dependabot[bot] as PRs author).

The supported character set is:

  • alphanumeric characters
  • - (hyphen)
  • _ (underscore)
  • . (dot)
  • [ and ] (square brackets)
Sourcetype t
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval to_string : t -> string
Sourceval to_dyn : t -> Crs_stdlib.Dyn.t
Sourceval to_json : t -> Crs_stdlib.Json.t
Sourceval of_json : Crs_stdlib.Json.t -> t
Sourceval of_string : string -> (t, [ `Msg of string ]) Crs_stdlib.Result.t

of_string str returns Ok str if the string is a valid user handle, and an error otherwise. This is meant to be used to validate untrusted entries.

Sourceval v : string -> t

v str is a convenient wrapper to build a t or raise Invalid_argument. This is typically handy for applying on trusted literals.