(self)
| 15 | |
| 16 | class JiraSmartCz(BaseCommitizen): |
| 17 | def questions(self) -> list[CzQuestion]: |
| 18 | return [ |
| 19 | { |
| 20 | "type": "input", |
| 21 | "name": "message", |
| 22 | "message": "Git commit message (required):\n", |
| 23 | # 'validate': RequiredValidator, |
| 24 | "filter": lambda x: x.strip(), |
| 25 | }, |
| 26 | { |
| 27 | "type": "input", |
| 28 | "name": "issues", |
| 29 | "message": "Jira Issue ID(s) separated by spaces (required):\n", |
| 30 | # 'validate': RequiredValidator, |
| 31 | "filter": lambda x: x.strip(), |
| 32 | }, |
| 33 | { |
| 34 | "type": "input", |
| 35 | "name": "workflow", |
| 36 | "message": "Workflow command (testing, closed, etc.) (optional):\n", |
| 37 | "filter": lambda x: "#" + x.strip().replace(" ", "-") if x else "", |
| 38 | }, |
| 39 | { |
| 40 | "type": "input", |
| 41 | "name": "time", |
| 42 | "message": "Time spent (i.e. 3h 15m) (optional):\n", |
| 43 | "filter": lambda x: "#time " + x if x else "", |
| 44 | }, |
| 45 | { |
| 46 | "type": "input", |
| 47 | "name": "comment", |
| 48 | "message": "Jira comment (optional):\n", |
| 49 | "filter": lambda x: "#comment " + x if x else "", |
| 50 | }, |
| 51 | ] |
| 52 | |
| 53 | def message(self, answers: Mapping[str, str]) -> str: |
| 54 | return " ".join( |
no outgoing calls