Closed Aetherinox closed 5 months ago
Update, because I had to push some changes today, and it happened more, but this time with 3-4 items.
I noticed that it's occurring with commits that I've added additional notes to (I have commitMode
enabled.)
If I push a commit with just a title, it shows in the list fine. However, if I throw in additional comments in the commit description; it doesn't show in the changelog on the releases page.
Second example:
The same is true for 2 other commits I made. They were skipped and had descriptions.
The other interesting note is that in the logs, it seems to think they are uncategorized, even though they follow the exact same commit standards that the working ones did.
โน๏ธ Removed 0 pull requests during deduplication
โน๏ธ Used 0 transformers to adjust message
โ๏ธ Wrote messages for 11 pull requests
โน๏ธ Ordered all pull requests into 13 categories
โ๏ธ Wrote 7 categorized pull requests down
โ๏ธ Wrote 4 non categorized pull requests down
โ๏ธ Wrote 0 ignored pull requests down
โน๏ธ Filled template
That's a tricky one. it could be that the regex does not match if it is multi-line. what regex flags are you setting?
Oh actually we only take the first line ๐ค
Actually good question, are you referring to category.rules.flags
? Because from what I see, I have not set these yet.
In hindsight given we trim it to only keep the first line for the summary it shouldn't matter ๐ค
unless we use the message
for the title. ๐ค
Edit: we use the summary: https://github.com/mikepenz/release-changelog-builder-action/blob/develop/src/pr-collector/commits.ts#L113
So I am not sure yet.
Can you point me to the CI run so I might test it locally?
Keep in mind, my workflow has a lot of steps, so you may want to cut them down. Workflow: https://github.com/Aetherinox/obsidian-gistr/blob/main/.github/workflows/release-npm.yml
The particular action is: https://github.com/Aetherinox/obsidian-gistr/actions/runs/8544149198/job/23409544035, which produced this release with the messed up changelog: https://github.com/Aetherinox/obsidian-gistr/releases/tag/1.6.5
For the workflow, check the step "๐ Changelog โบ Build (Categorized)"
, there's a step below labeled Uncategorized
, which is not being used right now. The step you want can be directly accessed via https://github.com/Aetherinox/obsidian-gistr/blob/a9e515f7799385cbe4b51ba9d31f8c8a1b42828f/.github/workflows/release-npm.yml#L264
So debugging this. message and title appear to look fine.
Looking further though, shows that given you don't specify which property to extract the label from (using the label extractor) it will automatically pick the body
Given the body
is multiple lines, the standard regex won't match now. regexes handle multi line different. I believe the m
flag would change the behavior for multi line.
Anyways, the easiest solution in your case is to adjust the config to not match the lable on the body, but instead of the single line title
:
E.g. change the label_extractor
to:
"label_extractor": [
{
"pattern": "^(build|ci|change|chore|doc|docs|wiki|remove|deprecate|security|dependency|dep|package|feat|feature|fix|bug|perf|optimize|optimization|refactor|style|test|tests|vault):(.*)",
"target": "$1",
"on_property": "title"
},
{
"pattern": "^(build|ci|change|chore|doc|docs|wiki|remove|deprecate|security|dependency|dep|package|feat|feature|fix|bug|perf|optimize|optimization|refactor|style|test|tests|vault){1}(\\([\\w\\-\\.]+\\))?(!)?:(.*)",
"target": "$1",
"on_property": "title"
}
],
Please let me know if that fixed it. closing due to inactivity
Oops, sorry. I thought I replied back, but somewhere along the line, my brain died.
Yes, thank you, it worked perfectly. I can now add descriptions again to my commits.
Been using the fix for the last two weeks and not a single issue. I've got this github action running on like 7 of my repos without any issues.
Sorry to bug ya, but this is a rather odd issue, and I can't for the life of me figure it out.
I have the following json template
It seems to be skipping / ignoring
feat
. No matter what I do. I've ensured it was spelt properly, and matches in all of the rows needed. Every other entry works, but not when I tag something as:feat
: insert feature hereThe commit in question had the text: feat: add gistr-web codeblock as alternative to raw: true