Skip to content

feat(github): add Create Issue Comment component#2934

Open
zekebawt wants to merge 1 commit intosuperplanehq:mainfrom
zekebawt:feat/github-create-issue-comment
Open

feat(github): add Create Issue Comment component#2934
zekebawt wants to merge 1 commit intosuperplanehq:mainfrom
zekebawt:feat/github-create-issue-comment

Conversation

@zekebawt
Copy link

@zekebawt zekebawt commented Feb 7, 2026

Summary

Implements the GitHub Create Issue Comment component per issue #2256.

Changes

  • 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

Component Details

The Create Issue Comment component allows adding comments to GitHub issues or PRs with:

Configuration

  • Repository: Select the GitHub repository containing the issue/PR
  • Issue Number: The issue or pull request number (supports expressions)
  • Body: The comment text (Markdown supported, supports expressions)

Use Cases

  • Post deployment status or remediation updates
  • Add runbook links, error details, or status for responders
  • Sync Slack or PagerDuty notes into GitHub as comments
  • Add automated test results, build status, or review comments

Output

Returns the created comment object with:

  • Comment ID
  • Body text
  • Author information
  • Created timestamp
  • HTML URL to the comment

Testing

All tests pass:

go test ./pkg/integrations/github/... -v -run "CreateIssueComment"

TypeScript compiles without errors.

Demo Video

[Will be attached separately]

Closes #2256

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>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 || "-",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Additional Locations (1)

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GitHub] Create Issue Comment

1 participant