Merge pull request #49537 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot 2024-03-05 17:56:05 -05:00 коммит произвёл GitHub
Родитель 8b7ff0b1c3 79e2cd3683
Коммит 0643b90424
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -52,6 +52,8 @@ As part of an expression, you can use `boolean`, `null`, `number`, or `string` d
| `number` | Any number format supported by JSON. | | `number` | Any number format supported by JSON. |
| `string` | You don't need to enclose strings in `{% raw %}${{{% endraw %}` and `{% raw %}}}{% endraw %}`. However, if you do, you must use single quotes (`'`) around the string. To use a literal single quote, escape the literal single quote using an additional single quote (`''`). Wrapping with double quotes (`"`) will throw an error. | | `string` | You don't need to enclose strings in `{% raw %}${{{% endraw %}` and `{% raw %}}}{% endraw %}`. However, if you do, you must use single quotes (`'`) around the string. To use a literal single quote, escape the literal single quote using an additional single quote (`''`). Wrapping with double quotes (`"`) will throw an error. |
Note that in conditionals, falsy values (`false`, `0`, `-0`, `""`, `''`, `null`) are coerced to `false` and truthy (`true` and other non-falsy values) are coerced to `true`.
### Example of literals ### Example of literals
{% raw %} {% raw %}
@ -125,7 +127,7 @@ env:
{% endraw %} {% endraw %}
In this example, we're using a ternary operator to set the value of the `MY_ENV_VAR` environment variable based on whether the {% data variables.product.prodname_dotcom %} reference is set to `refs/heads/main` or not. If it is, the variable is set to `value_for_main_branch`. Otherwise, it is set to `value_for_other_branches`. In this example, we're using a ternary operator to set the value of the `MY_ENV_VAR` environment variable based on whether the {% data variables.product.prodname_dotcom %} reference is set to `refs/heads/main` or not. If it is, the variable is set to `value_for_main_branch`. Otherwise, it is set to `value_for_other_branches`.
It is important to note that the first value after the `&&` condition must be `truthy` otherwise the value after the `||` will always be returned. It is important to note that the first value after the `&&` must be truthy. Otherwise, the value after the `||` will always be returned.
## Functions ## Functions