@jsenv/github-check-run 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/github-check-run",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Interact with GitHub check rest API",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -83,21 +83,24 @@ export const startGithubCheckRun = async ({
83
83
  }) => {
84
84
  let annotationsSent = 0;
85
85
  const annotationsBatch = annotations.slice(annotationsSent, 50);
86
- logger.debug(`update check run ${check.id}`);
86
+
87
87
  try {
88
+ const body = {
89
+ ...(status ? { status } : {}),
90
+ ...(conclusion ? { conclusion } : {}),
91
+ output: {
92
+ ...(title ? { title } : {}),
93
+ ...(summary ? { summary } : {}),
94
+ annotations: annotationsBatch,
95
+ },
96
+ };
97
+ logger.debug(`PATCH check ${check.html_url}
98
+ --- body ---
99
+ ${JSON.stringify(body, null, " ")}`);
88
100
  await PATCH({
89
101
  url: check.url,
90
102
  githubToken,
91
- body: {
92
- head_sha: commitSha,
93
- ...(status ? { status } : {}),
94
- ...(conclusion ? { conclusion } : {}),
95
- output: {
96
- ...(title ? { title } : {}),
97
- ...(summary ? { summary } : {}),
98
- annotations: annotationsBatch,
99
- },
100
- },
103
+ body,
101
104
  });
102
105
  logger.debug(`${UNICODE.OK} check updated`);
103
106
  } catch (e) {