package crs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Private.ConfigSource

A type to hold declarative values to configure crs commands for a given repository.

The expectations is that certain commands allow for a file to be given as argument to a --config FILE flag, which must contain a serialization of a value of type t.

This particular config is expected to contain repository specific configuration.

We are using JSON5 as serialization format.

Sourcemodule Annotation_severity : sig ... end
Sourcetype t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t

Getters

default_repo_owner When not in a PR, the default_repo_owner may be used to assigned certain kinds of otherwise not easy to assign to a particular user. For example, invalid CRs when creating CRs annotation for a particular commit outside of a pull request.

If the repository is owned by an individual, this would typically be that user. If the repository is owned by an organization, this may be set to a user in particular who would be assigned otherwise unassignable CRs. If it isn't set, such CRs will simply not be assigned to any one in particular.

user_mentions_allowlist enables a specific list of users to be notified in annotations comments, when notifications is requested. This is a protection measure to avoid spamming users that do not have ties to a repo in particular, or simply do not wish to be notified via CRs.

Sourceval invalid_crs_annotation_severity : t -> Annotation_severity.t Base.option
Sourceval crs_due_now_annotation_severity : t -> Annotation_severity.t Base.option

Create configs

Sourceval create : ?default_repo_owner:Volgo_base.Vcs.User_handle.t -> ?user_mentions_allowlist:Volgo_base.Vcs.User_handle.t Base.list -> ?invalid_crs_annotation_severity:Annotation_severity.t -> ?crs_due_now_annotation_severity:Annotation_severity.t -> Base.unit -> t
Sourceval empty : t
Sourceval load_exn : path:Fpath_base.Fpath.t -> emit_github_annotations:Base.bool -> t

The loading of the config allows for some compatibility transitions during which deprecated names and or constructs are allowed. However, when they are detected, warnings are emitted. For convenience and help users discover warnings during CI runs, the loading can optionally include CI warnings on stderr for GitHub, using workflow annotations. To activate, supply emit_github_annotations:true.