* Helper function to set comment outputs and return comment metadata * @param {string|number} commentId - The comment ID * @param {string} commentUrl - The comment URL * @param {RepoRef} [eventRepo] - Repository where the comment was created (defaults to context.repo at runtime) * @param {{ logR
(commentId, commentUrl, eventRepo = context.repo, options = {})
| 61 | * @returns {CommentMetadata} |
| 62 | */ |
| 63 | function setCommentOutputs(commentId, commentUrl, eventRepo = context.repo, options = {}) { |
| 64 | if (options.logReuse) { |
| 65 | core.info(`Reusing existing status comment outputs`); |
| 66 | } else { |
| 67 | core.info(`Successfully created comment with workflow link`); |
| 68 | } |
| 69 | core.info(`Comment ID: ${commentId}`); |
| 70 | core.info(`Comment URL: ${commentUrl}`); |
| 71 | core.info(`Comment Repo: ${eventRepo.owner}/${eventRepo.repo}`); |
| 72 | core.setOutput("comment-id", commentId.toString()); |
| 73 | core.setOutput("comment-url", commentUrl); |
| 74 | core.setOutput("comment-repo", `${eventRepo.owner}/${eventRepo.repo}`); |
| 75 | return { |
| 76 | id: commentId.toString(), |
| 77 | url: commentUrl, |
| 78 | repo: eventRepo, |
| 79 | }; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * @param {unknown} value |
no outgoing calls
no test coverage detected