Parse entire commit message not only first line
- Dominant language
- TypeScript
- Stars
- 5.5k
- Forks
- 379
- Avg merge
- 2h 8m
- Merged PRs (30d)
- 6
Description
Commit-Messages via `danger.git.commits` return only the first line and is parsed
- no body
- special chars (like `!`) are removed
What I am trying to achieve are warnings based on file changes in combination with commit guidelines (e.g. breaking changes with [conventional commits](https://www.conventionalcommits.org/en/)).
message:
```
test!: breaking change
- this is the commit body with different "%&&%"§!_" signs
BREAKING-CHANGE:
here are breaking changes. what kind of actions are required?
```
danger returns:
```
message: 'test-breaking-change'
```
I guess is how the message is processed (locally?)
https://github.com/danger/danger-js/blob/4100842c8922fa46e975ed772c1eb6ece677ff7e/source/platforms/git/localGetCommits.ts#L17
Contributor guide
Research direction
Start in source/platforms/git/localGetCommits.ts around line 17 and trace how danger.git.commits processes commit messages. Verify the behavior against the example containing a body, special characters, and BREAKING-CHANGE text; done means the returned message preserves the entire commit message rather than only a normalized first line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100