File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ inputs:
1414 description : ' Name of the test type used in comments (e.g. Robot)'
1515 required : false
1616 default : ' Test'
17+ post-comment :
18+ description : ' Whether to post a comment on the PR'
19+ required : false
20+ default : ' true'
1721 token :
1822 description : ' GitHub token or PAT used to post comments (defaults to github.token)'
1923 required : false
3337 const { number: pr, head: { sha } } = context.payload.pull_request;
3438 const repo = context.repo;
3539
40+ const postCommentEnabled = '${{ inputs.post-comment }}' !== 'false';
3641 const postComment = async (body) => {
42+ if (!postCommentEnabled) { core.info('post-comment is disabled. Skipping comment.'); return; }
3743 try {
3844 await github.rest.issues.createComment({ ...repo, issue_number: pr, body });
3945 } catch (err) {
You can’t perform that action at this time.
0 commit comments