Skip to content

Conversation

@gmeligio
Copy link
Contributor

@gmeligio gmeligio commented Jun 7, 2025

Description

Check if the commit.footers array was defined in the body template. An alternative would be to always pass commit.footers and empty if there are no footers. I don't have enough Rust knowledge to make that change related to #97.

Motivation and Context

The change is required to fix a bug in examples/detailed.toml. That configuration assumes that all the commits will have a footer. This is a bug when rendering the body template because sometimes there could be commits without footers because the PR author merged without a footer.

How Has This Been Tested?

Creating a detailed.toml configuration in my private repository and applying the fix.

Screenshots / Logs (if applicable)

Variable commit.footers not found in context while rendering 'body'
image

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@welcome
Copy link

welcome bot commented Jun 7, 2025

Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️

@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 41.95%. Comparing base (9970402) to head (2c6959e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1170   +/-   ##
=======================================
  Coverage   41.95%   41.95%           
=======================================
  Files          21       21           
  Lines        1981     1981           
=======================================
  Hits          831      831           
  Misses       1150     1150           
Flag Coverage Δ
unit-tests 41.95% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gmeligio gmeligio marked this pull request as ready for review June 7, 2025 09:50
@gmeligio gmeligio requested a review from orhun as a code owner June 7, 2025 09:50
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Looks reasonable, thanks!

@orhun orhun merged commit 078545f into orhun:main Jun 7, 2025
84 checks passed
@welcome
Copy link

welcome bot commented Jun 7, 2025

Congrats on merging your first pull request! ⛰️

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.

3 participants