Open fuhlig opened 4 years ago
That part of the codebase is only used in danger local
, for a normal danger ci
or danger pr
it would use the GitHub API: https://github.com/danger/danger-js/blob/4100842c8922fa46e975ed772c1eb6ece677ff7e/source/platforms/github/GitHubGit.ts#L19-L29 which comes from https://github.com/danger/danger-js/blob/4100842c8922fa46e975ed772c1eb6ece677ff7e/source/platforms/github/GitHubAPI.ts#L208-L212
A commit looks like this which doesn't seem too have anything a bit more raw for a full message?
Is this consistent across all VCS?
I don't quite understand why a local commit is handled differently. Is there any difference between local and remote (on any VCS) commits? Honest question because that would be new to me
Everything in the Danger DSL is normally done via an API, with the exception of danger local
which replicates one locally. Danger is built to not just run on CI, so no guarantees of FS access.
Each VCS API (github/gitlab/bitbucket etc) all implements their own Commit API -> GitCommit
code
Commit-Messages via
danger.git.commits
return only the first line and is parsed!
) are removedWhat I am trying to achieve are warnings based on file changes in combination with commit guidelines (e.g. breaking changes with conventional commits).
message:
danger returns:
I guess is how the message is processed (locally?) https://github.com/danger/danger-js/blob/4100842c8922fa46e975ed772c1eb6ece677ff7e/source/platforms/git/localGetCommits.ts#L17