Module: Aireview::ReviewSchemas
- Defined in:
- lib/aireview/review_schemas.rb
Class Method Summary collapse
Class Method Details
.critique ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/aireview/review_schemas.rb', line 28 def critique " {\n \"verdicts\": [\n {\n \"id\": \"C1\",\n \"decision\": \"keep\",\n \"reason\": \"why the finding is confirmed\",\n \"refinement\": {\n \"problem\": \"refined finding text\",\n \"why\": \"why this is really a problem\",\n \"suggestion\": \"what to fix or check\",\n \"category\": \"bug\",\n \"severity\": \"major\"\n }\n },\n {\n \"id\": \"C2\",\n \"decision\": \"reject\",\n \"reason\": \"why the finding is rejected\"\n }\n ]\n }\n SCHEMA\nend\n".strip |
.generate ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/aireview/review_schemas.rb', line 7 def generate " {\n \"summary\": \"1-2 sentences about the essence of the MR changes\",\n \"candidates\": [\n {\n \"id\": \"C1\",\n \"file\": \"path/from/diff.rb\",\n \"line\": 42,\n \"quoted_code\": \"changed code fragment\",\n \"problem\": \"finding text\",\n \"why\": \"why it matters\",\n \"suggestion\": \"what to fix or check\",\n \"category\": \"bug\",\n \"severity\": \"major\"\n }\n ]\n }\n SCHEMA\nend\n".strip |