feat(freeze): no authors in the config, no author check
A repository that takes commits from people it cannot list has no way to freeze a range today: a null `authors` falls back to `git config user.email`, so every foreign author or committer fails. Null, or no key, now means neither is checked; the freeze warns that it did not check them and records `authors` as null. A list is checked as before. An empty list, which no commit could pass, is a config error that points at null. Released as 1.1.0.
This commit is contained in:
parent
0d3d8ed2d2
commit
c6b4d78245
10 changed files with 52 additions and 49 deletions
|
|
@ -36,10 +36,9 @@ export namespace Crafter::Review::Config {
|
|||
// The config for a dump: the database URL with its password masked, no
|
||||
// `_` bookkeeping keys.
|
||||
Json Redacted(const Json& config);
|
||||
// The emails the freeze accepts: the configured list, else the
|
||||
// repository's git identity.
|
||||
std::vector<std::string> Authors(const Json& config, const std::filesystem::path& repo);
|
||||
std::string GitUserEmail(const std::filesystem::path& repo);
|
||||
// The emails the freeze accepts as author and committer: the configured
|
||||
// list; none (null, or no `authors` key) - the freeze checks neither.
|
||||
std::optional<std::vector<std::string>> Authors(const Json& config);
|
||||
// The lens files no mode lists (what runs nowhere: the slots and init).
|
||||
std::vector<std::string> LensesOff(const Json& config);
|
||||
// {lens file: environment} for every lens of the table, as the config
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ export namespace Crafter::Review::Freeze {
|
|||
bool replace = false;
|
||||
bool worktree = false;
|
||||
bool requireSigned = false;
|
||||
std::vector<std::string> authors;
|
||||
// The emails author and committer must be among; none: not checked.
|
||||
std::optional<std::vector<std::string>> authors;
|
||||
std::string aiTrailers = "forbid";
|
||||
std::vector<std::string> allowDirty;
|
||||
std::optional<std::string> configBase;
|
||||
|
|
|
|||
Loading…
Reference in a new issue