Here's a sample course that closes an issue on comment.
title: Commenting on Issues
tagline: Learn how to comment on an issue
description: Point users to a newly created issue and closes the original issue
template:
name: commenting-on-issues
repo: commenting-on-issues-template
steps:
- title: Comment on an issue
event: issue_comment.created
actions:
- type: createIssue
title: New Issue
body: an-issue.md
# Store the response for this new issue by assigning an action_id
action_id: new_issue
# Close the issue the user just commented on
- type: closeIssue
# Respond in the issue the user just commented on
- type: respond
with: a-response.md
# Include a `data` object to provide some template variables
data:
# Reference the response of the `new_issue` action
nextIssueUrl: '%actions.new_issue.data.html_url%'