What Information Is Included in the Asana Subtask Description and Comments

The GitHub‑to‑Asana integration creates rich‑HTML content for subtask descriptions containing pull request metadata, file statistics, and labels, while subtask comments include emoji‑coded review statuses, comment counts, and reviewer attribution.

The keitap/github-asana-request-review-action open‑source automation bridges GitHub pull requests with Asana task management by generating structured subtasks and activity comments. When a reviewer is assigned on GitHub, the action populates specific fields in Asana with detailed context about the code changes and review activity. Understanding exactly what information is included in the Asana subtask description and comments helps teams customize their workflows and debug integration issues.

Asana Subtask Description Content

When the action creates a review request subtask, it populates the HTMLNotes field (the subtask description) with a formatted summary of the pull request. This content is generated by the createReviewRequestDescText function in asana.go (lines 200‑212).

The description opens with a hyperlink to the specific pull request on GitHub, formatted as #<number>: <title>. Immediately following this link is the requestor’s Asana user permalink, generated via requester.GetUserPermalink(), which creates a clickable reference to the PR author’s Asana profile.

File Change Statistics and Labels

The body includes quantitative metadata about the code changes:

  • Total changed files (<b>%d</b> changed files)
  • Additions and deletions displayed as +<additions> -<deletions>
  • Label list rendered by getLabelsText(pr), which formats each GitHub label as #<b>label</b> and joins them with commas

The description concludes with a fixed call‑to‑action phrase: “Could you please review a pull request ❤️”.

Implementation Example

func createReviewRequestDescText(requester *Account, pr *github.PullRequestEvent) string {
    return fmt.Sprintf(`<body><a href="%s">#%d: %s</a> by %s

<b>%d</b> changed files (<b>+%d -%d</b>)
%s

Could you please review a pull request ❤️
</body>`,
        pr.PullRequest.GetHTMLURL(),               // PR link
        pr.PullRequest.GetNumber(),                // PR number
        pr.PullRequest.GetTitle(),                 // PR title
        requester.GetUserPermalink(),              // requester’s Asana link
        pr.PullRequest.GetChangedFiles(),          // total changed files
        pr.PullRequest.GetAdditions(),            // + additions
        pr.PullRequest.GetDeletions(),            // – deletions
        getLabelsText(pr),                         // formatted label list
    )
}

Asana Subtask Comment Content

When a reviewer submits feedback on GitHub, the action posts a story comment to the corresponding Asana subtask using buildReviewCommentHTML in asana.go (lines 18‑52). This comment captures the review state, inline comment counts, and the review body text.

Review Status and Emoji Indicators

The comment encodes the GitHub review state with specific emoji prefixes for instant visual recognition:

  • ✅ Approved for approved reviews
  • 💬 Commented for comment‑only reviews
  • ❗️ Changes Requested for reviews requesting modifications

When the review contains inline comments on specific lines of code, the status line expands to include the count: “✅💬 Approved with 3 comments” (or “comment” for singular).

Reviewer Attribution and Body Content

Each comment includes:

  • A direct link to the GitHub review page (reviewURL)
  • The reviewer’s Asana permalink (reviewerPermalink)
  • The full review body text (if non‑empty), appended verbatim after the header
  • A #github-asana-request-review signature (included only for PR‑level comments, not for individual review comments)

Comment Construction Logic

func buildReviewCommentHTML(reviewURL, reviewState, reviewerPermalink, reviewBody string, commentCount int) string {
    var stateEmoji, stateText string
    switch reviewState {
    case "approved":
        stateEmoji = "✅"
        stateText = "Approved"
    case "commented":
        stateEmoji = "💬"
        stateText = "Commented"
    case "changes_requested":
        stateEmoji = "❗️"
        stateText = "Changes Requested"
    }

    statusLine := fmt.Sprintf("%s %s", stateEmoji, stateText)
    if commentCount > 0 {
        label := "comments"
        if commentCount == 1 {
            label = "comment"
        }
        statusLine = fmt.Sprintf("%s💬 %s with %d %s", stateEmoji, stateText, commentCount, label)
    }

    htmlText := fmt.Sprintf(`<body><a href="%s"><b>%s</b></a>: reviewed by %s`,
        reviewURL, statusLine, reviewerPermalink)

    if body := strings.TrimSpace(reviewBody); body != "" {
        htmlText += "\n" + body
    }
    htmlText += `</body>`
    return htmlText
}

Integration Workflow and API Calls

The action utilizes the Asana Go client to persist this content. The AddCodeReviewSubtask function invokes createReviewRequestDescText to populate the HTMLNotes field during subtask creation, while AddCodeReviewSubtaskComment calls buildReviewCommentHTML to generate story comments on existing subtasks.

// Creating the review subtask with description
subtask, _ := AddCodeReviewSubtask(
    asanaClient,
    parentTaskID,
    42,                     // PR number
    requesterAccount,
    reviewerAccount,
    dueDate,
    pullRequestEvent,
)

// Adding review activity as comment
comment, _ := AddCodeReviewSubtaskComment(
    asanaClient,
    subtask,
    requesterAccount,
    reviewerAccount,
    reviewEvent,            // github.PullRequestReviewEvent
    reviewEvent.CommentCount,
)

Key Source Files and Functions

File Relevant Symbols Purpose
asana.go createReviewRequestDescText, buildReviewCommentHTML, AddCodeReviewSubtask, AddCodeReviewSubtaskComment Core logic for constructing HTML content sent to Asana
handler.go Webhook event handlers Orchestrates calls to Asana functions when GitHub events fire
account.go Account struct, GetUserPermalink Resolves GitHub users to Asana permalinks for proper attribution
config.go Workspace and project configuration Determines target Asana projects for subtask creation

Summary

  • Subtask descriptions contain the PR link (#<num>: <title>), requester’s Asana profile, change statistics (files, additions, deletions), formatted labels, and a review request message.
  • Subtask comments display emoji‑coded review states (✅/💬/❗️), optional inline comment counts, direct links to GitHub reviews, reviewer attribution, and the review body text.
  • Both content types are generated in asana.go using createReviewRequestDescText (lines 200‑212) and buildReviewCommentHTML (lines 18‑52) respectively.
  • The integration uses the Asana Go client to populate HTMLNotes fields and create story comments on review subtasks.

Frequently Asked Questions

Does the Asana subtask description include the full pull request diff?

No, the subtask description does not include the full diff content. According to the source code in asana.go, the description only contains metadata about the changes—including the number of changed files, total additions, and deletions—along with a link to view the full diff on GitHub.

How does the integration handle multiple labels on a pull request?

The getLabelsText function in asana.go formats each GitHub label as #<b>label-name</b> and joins them with commas. If a pull request has multiple labels, they all appear as hashtags in the subtask description (for example: #bug #urgent #frontend).

What is the difference between a review comment and a PR‑level comment in Asana?

The subtask comment includes a #github-asana-request-review signature only for PR‑level comments, not for individual review comments. Both types include the review status emoji (✅, 💬, or ❗️) and reviewer attribution, but the signature serves as a filterable marker for high‑level review activity.

Can the "Could you please review a pull request" message be customized?

No, the source code shows this message is hardcoded as a fixed string in the createReviewRequestDescText function. The phrase “Could you please review a pull request ❤️” is appended to every subtask description without configuration options in the current implementation.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →