From 5a1a6010243ed38082edb2dddc90d4d141152e20 Mon Sep 17 00:00:00 2001 From: LiteObject Date: Thu, 22 May 2025 21:56:20 -0500 Subject: [PATCH 1/2] Update greeting message in InfoController's Get method for clarity --- src/MyWebApi/MyWebApi/Controllers/WeatherForecastController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MyWebApi/MyWebApi/Controllers/WeatherForecastController.cs b/src/MyWebApi/MyWebApi/Controllers/WeatherForecastController.cs index 11da5dc..f6f7881 100644 --- a/src/MyWebApi/MyWebApi/Controllers/WeatherForecastController.cs +++ b/src/MyWebApi/MyWebApi/Controllers/WeatherForecastController.cs @@ -16,7 +16,7 @@ public InfoController(ILogger 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); From 2f711e2dd2cf5d5c188186ca9cdfd9a73b32d890 Mon Sep 17 00:00:00 2001 From: LiteObject Date: Thu, 22 May 2025 22:18:11 -0500 Subject: [PATCH 2/2] Refactor prompt preparation in Code Review step for improved readability and environment variable export --- .github/workflows/code-review.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-review.yml b/.github/workflows/code-review.yml index 1b9d6c2..a613a75 100644 --- a/.github/workflows/code-review.yml +++ b/.github/workflows/code-review.yml @@ -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<> $GITHUB_ENV + echo "$PROMPT" >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + shell: /usr/bin/bash -e {0} - name: Code Review