Skip to content

Commit message summary line starting with tag does not seem to recognize tag #928

Open
@jwir3

Description

@jwir3

Using git-journal version: 1.8.1

I use gitmoji to tag the categories of my commits. As such, the tags for git-journal also correspond to categories. In order to alleviate this problem, I use the first word of the commit message as the category. For example, with a commit message having status line:

:bug: Fix an issue where base_url was not being correctly used.

The category would be "Fix" and the tag would be ":bug:" (or, rather just "bug").

This appears to work, however, in does not recognize tags that are at the start of the commit message status line. Consider the following log with config files (please note this is a real commit log available here:

Commit Log:

commit 8f416562eb3f50be26b97b4f9f485310020637b1 (HEAD -> main)
Author: Scott Johnson <jaywir3@gmail.com>
Date:   Sat Jun 26 10:59:30 2021 -0500

    Added blah blah blah :sparkles:

commit 5531fcaa54dc7cf2b3318fc1f213a08483d5ebd2 (origin/main)
Author: Scott Johnson <jaywir3@gmail.com>
Date:   Fri Jun 25 22:56:09 2021 -0500

    :bug: Fix issues with DELETE endpoint.

commit 2ad37a77efb6d7c4951784bac850087dcb5b7070 (tag: 1.0.3)
Author: Scott Johnson <jaywir3@gmail.com>
Date:   Fri Jun 25 22:45:54 2021 -0500

    :bug: Fix issue where userOrg was being input incorrectly.

commit 41102cd4a39b3521e1fc8db1e50f8b8a212fa45d (tag: 1.0.2)
Author: Scott Johnson <jaywir3@gmail.com>
Date:   Fri Jun 25 22:41:00 2021 -0500

    :bug: Fix an issue where base_url was not being correctly used.

commit 7d6931767f3fb601db4335a0869aae0ca13895ad (tag: 1.0.1)
Author: Scott Johnson <jaywir3@gmail.com>
Date:   Fri Jun 25 22:28:57 2021 -0500

    :lock: Remove accidentally committed PAT.

commit 444b3a64355557844beb848d80051ada2c00176a (tag: 1.0.0)
Author: Scott Johnson <jaywir3@gmail.com>
Date:   Fri Jun 25 22:06:49 2021 -0500

    :tada: Initial commit.

.gitjournal.toml

categories = ["Fix", "Remove", "Initial", "Added"]                              
category_delimiters = ["", ""]                                                  
colored_output = true                                                           
enable_debug = true                                                             
enable_footers = false                                                          
excluded_commit_tags = [""]                                                     
show_commit_hash = true                                                         
show_prefix = false                                                             
sort_by = "name"                                                                
template_prefix = "" 

template.toml

[[tags]]                                                                        
footers = []                                                                    
name = "default"                                                                
tag = "default"                                                                 
                                                                                
[[tags]]                                                                        
footers = []                                                                    
name = "Miscellaneous"                                                          
tag = "tada"                                                                    
                                                                                
[[tags]]                                                                        
footers = []                                                                    
name = "Features"                                                               
tag = "sparkles"                                                                
                                                                                
[footer]                                                                        
once = false                                                                    
text = ""                                                                       
                                                                                
[header]                                                                        
once = false                                                                    
text = ""  

When run with the command: git journal -a -t template.toml

Now, what I would expect is that there is one commit that get placed in the "Features" and "Miscellaneous" categories, respectively. Instead, there are no commits in Miscellaneous and there is a single commit in Features (the one having :sparkles: at the end of the line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions