Skip to content

Commit

Permalink
feat: render by minijnja and support git authors (#169)
Browse files Browse the repository at this point in the history
This closes #168 and closes #167.

Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored Jan 28, 2025
1 parent 223367e commit 1467c23
Show file tree
Hide file tree
Showing 25 changed files with 284 additions and 173 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# CHANGELOG

All notable changes to this project will be documented in this file.

## [6.0.0] 2025-01-28

### Breaking changes

Now, HawkEye uses MiniJinja as the template engine.

All the `properties` configured will be passed to the template engine as the `props` value, and thus:

* Previous `${property}` should be replaced with `{{ props["property"] }}`.
* Previous built-in variables `hawkeye.core.filename` is now `attrs.filename`.
* Previous built-in variables `hawkeye.git.fileCreatedYear` is now `attrs.git_file_created_year`.
* Previous built-in variables `hawkeye.git.fileModifiedYear` is now `attrs.git_file_modified_year`.

New properties:

* `attrs.git_authors` is a collection of authors of the file. You can join them with `, ` to get a string by `{{ attrs.git_authors | join(", ") }}`.

### Notable changes

Now, HawkEye would detect a leading BOM (Byte Order Mark) and remove it if it exists (#166). I tend to treat this as a bug fix, but it may affect the output of the header.
Loading

0 comments on commit 1467c23

Please sign in to comment.