Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add toBool function for template #867

Merged
merged 1 commit into from
Mar 17, 2023

Conversation

zekth
Copy link
Member

@zekth zekth commented Mar 17, 2023

Currently Deck parses env variable in templates and renders it only as string, with other types it creates issues like having boolean flags for example. With this PR we can do this:

services:
- name: svc1
  host: mockbin.org
  enabled: ${{ env "DECK_MOCKBIN_ENABLED" | toBool }}

Also i think we might want to do the same for Int / floats in the future

@zekth zekth requested a review from a team March 17, 2023 09:12
@CLAassistant
Copy link

CLAassistant commented Mar 17, 2023

CLA assistant check
All committers have signed the CLA.

@zekth zekth temporarily deployed to Configure ci March 17, 2023 09:13 — with GitHub Actions Inactive
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.01 🎉

Comparison is base (bd4f876) 35.54% compared to head (26ceb70) 35.56%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #867      +/-   ##
==========================================
+ Coverage   35.54%   35.56%   +0.01%     
==========================================
  Files          92       92              
  Lines       11264    11267       +3     
==========================================
+ Hits         4004     4007       +3     
  Misses       6867     6867              
  Partials      393      393              
Impacted Files Coverage Δ
file/readfile.go 83.78% <100.00%> (+0.45%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@GGabriele GGabriele merged commit ff70966 into Kong:main Mar 17, 2023
@zekth zekth deleted the feat/add-bool-templating branch March 17, 2023 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants