|
| 1 | +# Customizing |
| 2 | + |
| 3 | +**Build Cross Check** is designed as a shortcut to allow anyone to create a [Check Run](https://developer.github.com/v3/checks/) from their build process. Check Runs are always created with a status of Completed. |
| 4 | + |
| 5 | +## Schema |
| 6 | + |
| 7 | +The data structure and rules mimic the [Create Check Run](https://developer.github.com/v3/checks/runs/#create-a-check-run) operation in the GitHub Api. |
| 8 | + |
| 9 | +### CreateCheckRun <sub><sup>[src](https://github.com/justaprogrammer/BCC-Core/blob/master/src/BCC.Core/Model/CheckRunSubmission/CreateCheckRun.cs)</sup></sub> |
| 10 | + |
| 11 | +- name (string, required) - The name of the Check Run |
| 12 | +- title (string, required) - The title of the Check Run |
| 13 | +- summary (string, required) - The summary of the Check Run, supports Markdown |
| 14 | +- text (string) - The details of the Check Run, supports Markdown |
| 15 | +- conclusion: success, failure, neutral, cancelled, timedOut, actionRequired (enum, required) |
| 16 | +- annotations (array[Annotation]) |
| 17 | +- images (array[CheckRunImage]) |
| 18 | +- startedAt (string, required) |
| 19 | +- completedAt (string, required) |
| 20 | + |
| 21 | +### Annotation <sub><sup>[src](https://github.com/justaprogrammer/BCC-Core/blob/master/src/BCC.Core/Model/CheckRunSubmission/Annotation.cs)</sup></sub> |
| 22 | + |
| 23 | +- filename (string, required) |
| 24 | +- startLine (number, required) |
| 25 | +- endLine (number, required) |
| 26 | +- annotationLevel: notice, warning, failure (enum, required) |
| 27 | +- caption (string) |
| 28 | + |
| 29 | +### CheckRunImage <sub><sup>[src](https://github.com/justaprogrammer/BCC-Core/blob/master/src/BCC.Core/Model/CheckRunSubmission/CheckRunImage.cs)</sup></sub> |
| 30 | + |
| 31 | +- imageUrl (string, required) |
| 32 | +- alt (string, required) |
| 33 | +- caption (string) |
| 34 | + |
| 35 | +## Example Data |
| 36 | + |
| 37 | +Here is the output generated by **BCC-MSBuildLog** for [this](https://github.com/justaprogrammer/TestConsoleApp1/pull/1) Pull Request of `justaprogrammer/TestConsoleApp1`, our test application. It was used to generate [this](https://github.com/justaprogrammer/TestConsoleApp1/pull/1/checks?check_run_id=36879070) Check Run. |
| 38 | + |
| 39 | +``` |
| 40 | +{ |
| 41 | + 'name': 'MSBuild Log', |
| 42 | + 'title': '0 errors - 1 warning', |
| 43 | + 'summary': '- [TestConsoleApp1/Program.cs(13)](https://github.com/justaprogrammer/TestConsoleApp1/tree/815aa7a3051cc0d0ae6c6c2c89cba125e8027d86/TestConsoleApp1/Program.cs#L13) **Warning - CS0219** The variable \'hello\' is assigned but its value is never used\r\n', |
| 44 | + 'text': null, |
| 45 | + 'conclusion': 'success', |
| 46 | + 'annotations': [{ |
| 47 | + 'filename': 'TestConsoleApp1/Program.cs', |
| 48 | + 'checkWarningLevel': 'warning', |
| 49 | + 'title': 'CS0219: TestConsoleApp1/Program.cs(13)', |
| 50 | + 'rawDetails': null, |
| 51 | + 'message': 'The variable 'hello' is assigned but its value is never used', |
| 52 | + 'startLine': 13, |
| 53 | + 'endLine': 13 |
| 54 | + } |
| 55 | + ], |
| 56 | + 'images': null, |
| 57 | + 'startedAt': '2018-12-07T08:39:22.5858425-05:00', |
| 58 | + 'sompletedAt': '2018-12-07T08:39:22.6347882-05:00' |
| 59 | +} |
| 60 | +
|
| 61 | +``` |
0 commit comments