File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,17 @@ jobs:
1616 steps :
1717 - name : Write Comment
1818 run : |
19- echo '[{"body": "This is a comment for testing the issue write workflow"}]' > comments
19+ echo '[{"body": "This is a comment for testing the issue write workflow"}]' > comments-foo
20+ echo '[{"body": "This is another comment for testing the issue write workflow that was placed in a separate file"}]' > comments-bar
2021 - name : Upload Comment
2122 uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
2223 with :
23- name : workflow-args
24+ name : workflow-args-foo
2425 path : |
25- comments
26+ comments-foo
27+ - name : Upload Comment
28+ uses : actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
29+ with :
30+ name : workflow-args-bar
31+ path : |
32+ comments-bar
Original file line number Diff line number Diff line change 4747 github-token : ${{ secrets.GITHUB_TOKEN }}
4848 script : |
4949 var fs = require('fs');
50- const comments = JSON.parse(fs.readFileSync('./comments'));
50+ var comments = []
51+ for (local_file of fs.readdirSync('.')) {
52+ if (local_file.startsWith("comments")) {
53+ comments.push(...JSON.parse(fs.readFileSync(local_file)))
54+ }
55+ }
5156 if (!comments || comments.length == 0) {
5257 return;
5358 }
You can’t perform that action at this time.
0 commit comments