Skip to content

Commit 0fc2847

Browse files
committed
Handled the case of missing PR no.
Signed-off-by: Ujwal Akotkar <24bcs012@iiitdwd.ac.in>
1 parent 1c1ea33 commit 0fc2847

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/translation-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ jobs:
170170
with:
171171
script: |
172172
const issueNumber = Number(process.env.PR_NUMBER);
173+
if (!issueNumber || isNaN(issueNumber)) {
174+
throw new Error('PR_NUMBER not set or invalid');
175+
}
173176
const body = process.env.COMMENT_BODY || 'No comment generated.';
174177
await github.rest.issues.createComment({
175178
owner: context.repo.owner,

0 commit comments

Comments
 (0)