Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,23 @@ jobs:
- name: Prepare Prompt
run: |
DIFF=$(cat sanitized_diff.txt)
PROMPT=$(echo "Please review the following code changes, summarize the changes, and provide feedback:\n\n$DIFF\n\nFeedback:" | jq -sR .)

PROMPT="Please review the following code changes, summarize the changes, and provide feedback:

$DIFF

Feedback:"

echo "PROMPT:\n$PROMPT"

# Set the prompt as an environment variable for later steps
echo "prompt=$PROMPT" >> $GITHUB_ENV
# echo "prompt=$PROMPT" >> $GITHUB_ENV

# Export PROMPT so it's available to later steps
echo "prompt<<EOF" >> $GITHUB_ENV
echo "$PROMPT" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV

shell: /usr/bin/bash -e {0}

- name: Code Review
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public InfoController(ILogger<InfoController> logger)
[HttpGet(Name = "Get")]
public IActionResult Get()
{
var helloworld = "Hello World";
var helloworld = "Hello World from InfoController";
var message = "Hello World from InfoController. This is a sample message.";
_logger.LogInformation(message);
return Ok(message);
Expand Down