Skip to content

Commit

Permalink
Update empty-string-warning.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng authored Mar 25, 2024
1 parent ca6c363 commit 5f3e071
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/empty-string-warning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,19 @@ jobs:
const body = "Empty string detected!";
const owner = context.repo.owner;
const repo = context.repo.repo;


await github.rest.repos.createCommitComment({
owner,
repo,
body,
commit_sha: context.payload.pull_request.head.sha,
path,
line: parseInt(line, 10),
});

try {
await github.rest.repos.createCommitComment({
owner,
repo,
body,
commit_sha: context.payload.pull_request.head.sha,
path,
line: parseInt(line, 10),
});
} catch (error) {
console.error(`Error posting comment to ${path}:${line}`, error);
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5f3e071

Please sign in to comment.