MCPcopy Index your code
hub / github.com/commitizen-tools/commitizen / _get_commit_message

Method _get_commit_message

commitizen/commands/check.py:120–128  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

118 out.success("Commit validation: successful!")
119
120 def _get_commit_message(self) -> str | None:
121 if self.commit_msg_file is None:
122 # Get commit message from command line (--message)
123 return self.commit_msg
124
125 # Get commit message from file (--commit-msg-file)
126 return Path(self.commit_msg_file).read_text(
127 encoding=self.config.settings["encoding"]
128 )
129
130 def _get_commits(self) -> list[git.GitCommit]:
131 if (msg := self._get_commit_message()) is not None:

Callers 1

_get_commitsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected