mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 11:07:44 +00:00
GNU comment: Only display a comment if there is any (#4026)
* GNU comment: Only display a comment if there is any
This commit is contained in:
parent
fa17a94a73
commit
d68dd23a56
1 changed files with 12 additions and 6 deletions
8
.github/workflows/GnuComment.yml
vendored
8
.github/workflows/GnuComment.yml
vendored
|
@ -44,9 +44,15 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var issue_number = Number(fs.readFileSync('./NR'));
|
var issue_number = Number(fs.readFileSync('./NR'));
|
||||||
|
var content = fs.readFileSync('./result.txt');
|
||||||
|
console.log(content);
|
||||||
|
console.log(content.trim());
|
||||||
|
console.log(content.trim().length);
|
||||||
|
if (content.trim().length > 7) { // 7 because we have backquote + \n
|
||||||
await github.issues.createComment({
|
await github.issues.createComment({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
issue_number: issue_number,
|
issue_number: issue_number,
|
||||||
body: 'GNU testsuite comparison:\n```' + fs.readFileSync('./result.txt') + '\n```'
|
body: 'GNU testsuite comparison:\n```' + content + '\n```'
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue