feat(github): add Create Issue Comment component#2934
feat(github): add Create Issue Comment component#2934zekebawt wants to merge 1 commit intosuperplanehq:mainfrom
Conversation
Implements the GitHub Create Issue Comment component per issue superplanehq#2256. - Adds create_issue_comment.go with full component implementation - Adds create_issue_comment_test.go with comprehensive tests - Adds example_output_create_issue_comment.json for UI schema - Updates github.go to register the new component - Updates example.go with embed directive for example output - Adds create_issue_comment.ts UI mapper - Updates mappers/github/index.ts with new component references - Updates docs/components/GitHub.mdx with component documentation The component allows adding comments to GitHub issues or PRs, supporting: - Repository selection via integration resource - Issue number (supports expressions) - Comment body (Markdown supported, supports expressions) Use cases include deployment status updates, runbook links, cross-platform sync from Slack/PagerDuty, and automated feedback. Signed-off-by: Zeke <zekebawt@gmail.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on February 12
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| const comment = outputs.default[0].data as IssueComment; | ||
| Object.assign(details, { | ||
| "Created At": comment.created_at ? new Date(comment.created_at).toLocaleString() : "-", | ||
| "Created By": comment.user?.login || "-", |
There was a problem hiding this comment.
Missing optional chaining causes potential runtime crash
Medium Severity
The getExecutionDetails function accesses comment.created_at, comment.user, and comment.updated_at without optional chaining, but later in the same function uses comment?.id, comment?.body, etc. This is inconsistent with similar mappers (create_release.ts uses release?.created_at, base.ts uses issue?.created_at). If outputs.default[0].data is null or undefined, the code will throw a runtime error instead of gracefully handling it like the established pattern does.


Summary
Implements the GitHub Create Issue Comment component per issue #2256.
Changes
create_issue_comment.gowith full component implementationcreate_issue_comment_test.gowith comprehensive testsexample_output_create_issue_comment.jsonfor UI schemagithub.goto register the new componentexample.gowith embed directive for example outputcreate_issue_comment.tsUI mappermappers/github/index.tswith new component referencesdocs/components/GitHub.mdxwith component documentationComponent Details
The Create Issue Comment component allows adding comments to GitHub issues or PRs with:
Configuration
Use Cases
Output
Returns the created comment object with:
Testing
All tests pass:
TypeScript compiles without errors.
Demo Video
[Will be attached separately]
Closes #2256