Repository navigation
Match bot patterns against the author, so human commits mentioning GitHub still count [patch] - #179
Merged
Merged
Conversation
…tHub still count [patch] CommitAnalyzer and ChangelogGenerator matched "github" as a substring of the commit subject, so a human commit such as "Fix GitHubApiClient retry" was treated as a bot commit: it produced a prerelease instead of a patch and was left out of the changelog. Both now share BotCommitFilter. "[bot]" and "github-actions" are matched against the author only, "ProjectDirector" and "SyncFileContents" against the subject, and "github" is no longer matched anywhere. CommitAnalyzer reads commits through GetCommitsAsync so it has the author. Fixes #157 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KV83HNRiTm3h4n1KgMkdqX
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #157
What was wrong
CommitAnalyzerandChangelogGeneratoreach kept their ownBotPatternslist, and both lists included"github"matched as a substring of the commit subject. A human commit such as "Fix GitHubApiClient retry" was therefore treated as a bot commit. It produced a prerelease instead of a patch and was left out of the changelog.Change (per the maintainer decision on the issue)
BotCommitFilter(KtsuBuild/Git/BotCommitFilter.cs) holds both pattern lists, so the two classes can no longer drift apart:[bot]andgithub-actionsare matched against the author onlyProjectDirectorandSyncFileContentsare matched against the subject"github"is no longer matched against subjects or messages anywhereCommitAnalyzernow reads commits withGetCommitsAsync(%h%x1f%s%x1f%aN), which gives it the author alongside the subject. Skip-ci and explicit[major]/[minor]/[patch]/[pre]tags still read the subject, as they did before.ChangelogGeneratoruses the shared filter.Tests
AnalyzeAsync_HumanCommitMentioningGitHub_ReturnsPatchandGenerateAsync_KeepsHumanCommitMentioningGitHub. With"github"temporarily added back to the subject patterns, both fail. With the fix, both pass.github-actions[bot],dependabot[bot]) and check that those commits are still excluded.CommitAnalyzerTests,VersionCalculatorTestsand the fake process runner inPipelineServiceTestsnow serveGetCommitsAsyncin place ofGetCommitMessagesAsync.dotnet test: 762/762 passed. The Sonar-local build (.sonarlint/sonar-local.props) reports no new warnings in the touched files.IGitService.GetCommitMessagesAsyncis left in place. It has no callers in the library now, but removing it would be a public API change, so it is not part of this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01KV83HNRiTm3h4n1KgMkdqX
Generated by Claude Code