private getUserInstruction()

in src/github/junie/new-prompt-formatter.ts [99:118]


    private getUserInstruction(context: JunieExecutionContext, customPrompt?: string): string | undefined {
        let githubUserInstruction
        if (isPullRequestEvent(context)) {
            githubUserInstruction = context.payload.pull_request.body
        } else if (isPullRequestReviewEvent(context)) {
            githubUserInstruction = context.payload.review.body
        } else if (isPullRequestReviewCommentEvent(context)) {
            githubUserInstruction = context.payload.comment.body
        } else if (isIssuesEvent(context)) {
            githubUserInstruction = context.payload.issue.body
        } else if (isIssueCommentEvent(context)) {
            githubUserInstruction = context.payload.comment.body
        }

        const instruction = customPrompt || githubUserInstruction;
        return instruction ? `
        <user_instruction>
        ${instruction}
</user_instruction>` : undefined
    }