File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -19525,15 +19525,14 @@ var main = async () => {
19525
19525
data
19526
19526
}));
19527
19527
const outputFile = core.getInput("output_file") || "./diagram.svg";
19528
- await import_fs2.default.writeFileSync(outputFile, componentCodeString);
19529
- await octokit.repos.createStatus({
19528
+ await octokit.repo.updateFile({
19530
19529
owner: repo.owner.login,
19531
19530
repo: repo.name,
19531
+ path: outputFile,
19532
+ content: componentCodeString,
19532
19533
sha: context.sha,
19533
- state: "success",
19534
- target_url: `${context.base_url}/${outputFile}`,
19535
- description: "Repo visualizer: updated diagram",
19536
- context: "Repo visualizer: updated diagram"
19534
+ message: "Repo visualizer: updated diagram",
19535
+ branch: context.branch
19537
19536
});
19538
19537
console.log("All set!");
19539
19538
};
Original file line number Diff line number Diff line change @@ -35,22 +35,20 @@ const main = async () => {
35
35
36
36
const outputFile = core . getInput ( "output_file" ) || "./diagram.svg"
37
37
38
- await fs . writeFileSync ( outputFile , componentCodeString )
38
+ // await fs.writeFileSync(outputFile, componentCodeString)
39
39
40
40
41
41
// add outputFile to git
42
42
// await execWithOutput('git', ['add', outputFile])
43
43
44
-
45
-
46
- await octokit . repos . createStatus ( {
44
+ await octokit . repo . updateFile ( {
47
45
owner : repo . owner . login ,
48
46
repo : repo . name ,
47
+ path : outputFile ,
48
+ content : componentCodeString ,
49
49
sha : context . sha ,
50
- state : 'success' ,
51
- target_url : `${ context . base_url } /${ outputFile } ` ,
52
- description : 'Repo visualizer: updated diagram' ,
53
- context : 'Repo visualizer: updated diagram' ,
50
+ message : 'Repo visualizer: updated diagram' ,
51
+ branch : context . branch
54
52
} )
55
53
// await exec('git', ['add', outputFile])
56
54
// const diff = await execWithOutput('git', ['status', '--porcelain', outputFile])
You can’t perform that action at this time.
0 commit comments