()
| 276 | } |
| 277 | |
| 278 | async function addImmediateStatusComment() { |
| 279 | try { |
| 280 | const comment = await createOrReuseStatusComment({ |
| 281 | ...context, |
| 282 | nonFatalStatusCommentErrors: true, |
| 283 | }); |
| 284 | if (!comment?.id) { |
| 285 | return null; |
| 286 | } |
| 287 | return { |
| 288 | status_comment_id: String(comment.id), |
| 289 | ...(comment.url ? { status_comment_url: comment.url } : {}), |
| 290 | ...(comment.repo?.owner && comment.repo?.repo ? { status_comment_repo: `${comment.repo.owner}/${comment.repo.repo}` } : {}), |
| 291 | }; |
| 292 | } catch (error) { |
| 293 | core.warning(`Immediate status comment failed: ${String(error)}`); |
| 294 | return null; |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * @param {Array<unknown>} values |
no test coverage detected