MCPcopy Create free account
hub / github.com/github/gh-aw / setCommentOutputs

Function setCommentOutputs

actions/setup/js/add_workflow_run_comment.cjs:63–80  ·  view source on GitHub ↗

* 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 = {})

Source from the content-addressed store, hash-verified

61 * @returns {CommentMetadata}
62 */
63function 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

Callers 3

postDiscussionCommentFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected