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(templates): populate depTypes for templating #27939

Merged

Conversation

juancarlosjr97
Copy link
Contributor

@juancarlosjr97 juancarlosjr97 commented Mar 14, 2024

Changes

Adding a custom helper for handlebars as includes that will check if a list of strings will be valid for a template configuration.

  • Add includes handlebars
  • Add on runtime a depTypes to check against a list of depTypes found on the current updates

Context

#27818

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

This page already includes the depTypes https://docs.renovatebot.com/templates/#other-available-fields

How I've tested my work (please select one)

All tests are passing locally with 100% code coverage

=============================== Coverage summary ===============================
Statements   : 100% ( 40823/40823 )
Branches     : 100% ( 12896/12896 )
Functions    : 100% ( 5135/5135 )
Lines        : 100% ( 40242/40242 )
================================================================================

Test Suites: 703 passed, 703 total
Tests:       14597 passed, 14597 total
Snapshots:   731 passed, 731 total
Time:        374.562 s

This has been tested also on a PR with a public project juancarlosjr97/renovate-test-27818#7

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@CLAassistant
Copy link

CLAassistant commented Mar 14, 2024

CLA assistant check
All committers have signed the CLA.

@juancarlosjr97 juancarlosjr97 changed the title Feat/27818 commit message prefix advance Commit message prefix advance configuration with handlebars helper Mar 14, 2024
@juancarlosjr97 juancarlosjr97 changed the title Commit message prefix advance configuration with handlebars helper feat: commit message prefix advance configuration with includes handlebars Mar 14, 2024
lib/util/template/index.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@rarkins rarkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

De-duplicate the list

@juancarlosjr97 juancarlosjr97 changed the title feat: commit message prefix advance configuration with includes handlebars feat: customise commit message prefix advance configuration with includes and depTypes Mar 27, 2024
@juancarlosjr97 juancarlosjr97 marked this pull request as ready for review March 27, 2024 00:55
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please extract the template helper to a separate PR, so we can merge before the other changes.

lib/util/template/index.ts Outdated Show resolved Hide resolved
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM. waiting on @rarkins approval

@juancarlosjr97
Copy link
Contributor Author

juancarlosjr97 commented Mar 29, 2024

@viceice did you see the last comment from @rarkins #27939 (comment)?

@rarkins
Copy link
Collaborator

rarkins commented Apr 10, 2024

@juancarlosjr97 do you have a reproduction repo? I would like to understand why it doesn't already work "as is" without these changes being necessary

@juancarlosjr97
Copy link
Contributor Author

Yes, see this comment @rarkins #27939 (comment)

@rarkins
Copy link
Collaborator

rarkins commented Apr 11, 2024

@juancarlosjr97 if that's your reproduction repository, please include a description in the readme about expected vs observed behavior so others can understand it

@juancarlosjr97
Copy link
Contributor Author

juancarlosjr97 commented Apr 14, 2024

Hey @rarkins I have updated the README with details of the issue, the identified, and the solution https://github.com/juancarlosjr97/renovate-test-27939/blob/main/README.md :)

Let me know if you would like me to add more information, I put information about the reproduction and the found solution.

@viceice viceice requested a review from rarkins April 18, 2024 16:24
@rarkins rarkins requested a review from viceice April 20, 2024 06:48
@rarkins rarkins changed the title feat: customise commit message prefix advance configuration with includes and depTypes feat(templates): populate depTypes for templating Apr 21, 2024
@rarkins rarkins added this pull request to the merge queue Apr 21, 2024
Merged via the queue into renovatebot:main with commit b2711f8 Apr 21, 2024
37 checks passed
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 37.314.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

None yet

5 participants