diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-05-12 14:49:52 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.ru> | 2022-05-12 14:49:52 +0300 |
commit | 3aed08a18fa249b07acb03736b760f277cd1cf3c (patch) | |
tree | 29f0de0f4318bc4453dde6c27ae8f50a5cfea163 | |
parent | dd0c829bb9ff87019aba4525016f53b06266f877 (diff) | |
download | ydb-3aed08a18fa249b07acb03736b760f277cd1cf3c.tar.gz |
piglet: Extract metadata from commit message
* Introduce `CommitMetadata` struct with structured metadata (all the fields are optional)
* Drop `class Author` and use `NLibgit2::TSignature` directly instead
ref:3aae28cb614b3c611f8abb2b1c12ff114aaed46f
7 files changed, 8 insertions, 17 deletions
diff --git a/util/string/strip.h b/util/string/strip.h index a65d3fe069..c2ea61adce 100644 --- a/util/string/strip.h +++ b/util/string/strip.h @@ -188,6 +188,11 @@ inline TString& StripInPlace(TString& s) { return s; } +template <typename T> +inline void StripInPlace(T& s) { + StripString(s, s); +} + /// Returns a copy of the given string with removed leading and trailing spaces. inline TString Strip(const TString& s) Y_WARN_UNUSED_RESULT; inline TString Strip(const TString& s) { diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md index 2af48362e8..ec44d5c9b9 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md +++ b/ydb/docs/en/core/reference/ydb-sdk/_includes/install.md @@ -34,9 +34,5 @@ The build process using the source code is described in the source code reposito {% include [install/cmd_php.md](install/cmd_php.md) %} -- Node.JS - - {% include [install/cmd_nodejs.md](install/cmd_nodejs.md) %} - {% endlist %} diff --git a/ydb/docs/en/core/reference/ydb-sdk/_includes/install/cmd_nodejs.md b/ydb/docs/en/core/reference/ydb-sdk/_includes/install/cmd_nodejs.md deleted file mode 100644 index af82765dd5..0000000000 --- a/ydb/docs/en/core/reference/ydb-sdk/_includes/install/cmd_nodejs.md +++ /dev/null @@ -1,3 +0,0 @@ -``` bash -npm install ydb-sdk -``` diff --git a/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md b/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md index 32feac272d..e0bb77afda 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md +++ b/ydb/docs/en/core/reference/ydb-sdk/example/go/index.md @@ -51,8 +51,8 @@ db, err := ydb.Open( dsn, // yc.WithInternalCA(), // using Yandex.Cloud certificates ydb.WithAccessTokenCredentials(token), // token-based authentication -// ydb.WithAnonymousCredentials(), // anonymous authentication (for example, in docker ydb) -// yc.WithMetadataCredentials(ctx), // authentication from inside a VM in Yandex.Cloud or a function in Yandex Functions +// ydb.WithAnonimousCredentials(token), // anonymous authentication (for example, in docker ydb) +// yc.WithMetadataCredentials(token), // authentication from inside a VM in Yandex.Cloud or a function in Yandex Functions // yc.WithServiceAccountKeyFileCredentials("~/.ydb/sa.json"), // authentication in Yandex.Cloud using a service account file // environ.WithEnvironCredentials(ctx), // authentication using environment variables ) diff --git a/ydb/docs/ru/core/reference/ydb-sdk/_includes/auth.md b/ydb/docs/ru/core/reference/ydb-sdk/_includes/auth.md index e15b395508..faa16d3675 100644 --- a/ydb/docs/ru/core/reference/ydb-sdk/_includes/auth.md +++ b/ydb/docs/ru/core/reference/ydb-sdk/_includes/auth.md @@ -1,6 +1,6 @@ # Аутентификация в SDK -Как описано в статье о [подключении к серверу {{ ydb-short-name }}](../../../concepts/connect.md), клиент с каждым запросом должен отправить [аутентификационный токен](../../../concepts/connect.md#auth). Аутентификационный токен проверяется сервером и в случае успешной аутентификации запрос авторизуется и выполняется, иначе возвращается ошибка `Unauthenticated`. +Как описано в статье о [подключении к серверу {{ ydb-short-name }}](../../../concepts/connect.md), клиент с каждым в запросом должен отправить [аутентификационный токен](../../../concepts/connect.md#auth). Аутентификационный токен проверяется сервером и в случае успешной аутентификации запрос авторизуется и выполняется, иначе возвращается ошибка `Unauthenticated`. {{ ydb-short-name }} SDK использует объект, отвечающий за генерацию таких токенов. SDK предоставляет встроенные cпособы получения такого объекта: diff --git a/ydb/docs/ru/core/reference/ydb-sdk/_includes/install.md b/ydb/docs/ru/core/reference/ydb-sdk/_includes/install.md index 4c66ff447d..e6f06009a3 100644 --- a/ydb/docs/ru/core/reference/ydb-sdk/_includes/install.md +++ b/ydb/docs/ru/core/reference/ydb-sdk/_includes/install.md @@ -34,8 +34,4 @@ {% include [install/cmd_php.md](install/cmd_php.md) %} -- Node.JS - - {% include [install/cmd_nodejs.md](install/cmd_nodejs.md) %} - {% endlist %}
\ No newline at end of file diff --git a/ydb/docs/ru/core/reference/ydb-sdk/_includes/install/cmd_nodejs.md b/ydb/docs/ru/core/reference/ydb-sdk/_includes/install/cmd_nodejs.md deleted file mode 100644 index af82765dd5..0000000000 --- a/ydb/docs/ru/core/reference/ydb-sdk/_includes/install/cmd_nodejs.md +++ /dev/null @@ -1,3 +0,0 @@ -``` bash -npm install ydb-sdk -``` |