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

Help: how to include a "Other changes" section in the hbs template #87

Open
arkadioz opened this issue Jan 7, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@arkadioz
Copy link

arkadioz commented Jan 7, 2024

I am trying to modify the template to be able to identify any emoji that is not part of the defined sections, to be put in this "Other changes" section:

{{#if compareUrl}}
    # [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}})
{{else}}
    # v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}})
{{/if}}

{{#with commits}}
    {{#if sparkles}}
        ## ✨ New Features
        {{#each sparkles}}
            - {{> commitTemplate}}
        {{/each}}
    {{/if}}

    {{#if bug}}
        ## 🐛 Bug Fixes
        {{#each bug}}
            - {{> commitTemplate}}
        {{/each}}
    {{/if}}

    {{#if ambulance}}
        ## 🚑 Critical Hotfixes
        {{#each ambulance}}
            - {{> commitTemplate}}
        {{/each}}
    {{/if}}

    {{#if lock}}
        ## 🔒 Security Issues
        {{#each lock}}
            - {{> commitTemplate}}
        {{/each}}
    {{/if}}

    {{#if boom}}
        ## 💥 Breaking Changes
        {{#each boom}}
            - {{> commitTemplate}}
        {{/each}}
    {{/if}}

    {{#unless (or (eq this 'boom') (eq this 'lock') (eq this 'sparkles') (eq this 'bug') (eq this 'ambulance'))}}
        ## Other Changes
    {{/unless}}

{{/with}}

But when I run the workflow I get the following error (I am a little new to hbs so this "Other section" I made was with help of an AI, hopefully someone can help me correct it and add the desired section properly):

Error: Missing helper: "eq"

@momocow momocow added question Further information is requested enhancement New feature or request and removed question Further information is requested labels Jan 8, 2024
@momocow
Copy link
Owner

momocow commented Jan 11, 2024

I think this requires some changes in the data structure of the context.

I'll consider it as an enhancement request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants