Skip to content

Commit 6a142f7

Browse files
committed
Capture some server-side notes
1 parent dd22794 commit 6a142f7

File tree

1 file changed

+49
-2
lines changed

1 file changed

+49
-2
lines changed

Diff for: DEVELOPERS.md

+49-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ man man/cc-test-reporter.1
99

1010
This is the payload currently expected by `codeclimate.com/test_reports`.
1111

12-
*TODO*: remove keys not actually used by our system.
13-
1412
```json
1513
{
1614
"ci_service": {
@@ -27,8 +25,10 @@ This is the payload currently expected by `codeclimate.com/test_reports`.
2725
"covered_strength": 1,
2826
"environment": {
2927
"gem_version": "",
28+
"package_version": "",
3029
"pwd": "",
3130
"rails_root": "",
31+
"reporter_version": "",
3232
"simplecov_root": ""
3333
},
3434
"git": {
@@ -60,3 +60,50 @@ This is the payload currently expected by `codeclimate.com/test_reports`.
6060
]
6161
}
6262
```
63+
64+
## Server-Side Notes
65+
66+
### Writing
67+
68+
- We default `run_at` to `Time.now` when missing
69+
- We ignore `committed_at` when it's `0` (after `to_i`), apparently
70+
- No idea what downstream impact this case has, I know we at least rely on
71+
this in the Extension to know if results are still able to be rendered
72+
- We just skip reports if `ci_service.pull_request != "false"`, so good thing
73+
no-one writes that?
74+
- `environment` doesn't seem required, and we store only the following keys:
75+
76+
- `:test_framework`
77+
- `:pwd`
78+
- `:rails_root`
79+
- `:simplecov_root`
80+
- `:gem_version`
81+
82+
- From `ci_service` we store the following keys:
83+
84+
- `:name`
85+
- `:build_url`
86+
- `:build_identifier`
87+
- `:pull_request`
88+
- `:branch`
89+
- `:commit_sha`
90+
91+
### Reading
92+
93+
#### Coverage Comparisons
94+
95+
Used for comparison and/or status update event payloads:
96+
97+
- `branch`
98+
- `commit_sha`
99+
- `committed_at`
100+
- `covered_percent`
101+
102+
#### Rendering Coverage Info on codeclimate.com
103+
104+
Unclear. It think only `covered_percent` is copied to `snapshot` (repo-totals)
105+
and `constant` (by source file) records.
106+
107+
#### Rendering Coverage Info on api.codeclimate.com
108+
109+
TODO

0 commit comments

Comments
 (0)