Skip to content

Commit 76fa698

Browse files
authored
Merge pull request #22 from LiteObject/feature/refactor_code
Update greeting message in InfoController's Get method for clarity
2 parents 28521be + 2f711e2 commit 76fa698

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/code-review.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,23 @@ jobs:
5454
- name: Prepare Prompt
5555
run: |
5656
DIFF=$(cat sanitized_diff.txt)
57-
PROMPT=$(echo "Please review the following code changes, summarize the changes, and provide feedback:\n\n$DIFF\n\nFeedback:" | jq -sR .)
57+
58+
PROMPT="Please review the following code changes, summarize the changes, and provide feedback:
59+
60+
$DIFF
61+
62+
Feedback:"
63+
5864
echo "PROMPT:\n$PROMPT"
65+
5966
# Set the prompt as an environment variable for later steps
60-
echo "prompt=$PROMPT" >> $GITHUB_ENV
67+
# echo "prompt=$PROMPT" >> $GITHUB_ENV
68+
69+
# Export PROMPT so it's available to later steps
70+
echo "prompt<<EOF" >> $GITHUB_ENV
71+
echo "$PROMPT" >> $GITHUB_ENV
72+
echo "EOF" >> $GITHUB_ENV
73+
6174
shell: /usr/bin/bash -e {0}
6275

6376
- name: Code Review

src/MyWebApi/MyWebApi/Controllers/WeatherForecastController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public InfoController(ILogger<InfoController> logger)
1616
[HttpGet(Name = "Get")]
1717
public IActionResult Get()
1818
{
19-
var helloworld = "Hello World";
19+
var helloworld = "Hello World from InfoController";
2020
var message = "Hello World from InfoController. This is a sample message.";
2121
_logger.LogInformation(message);
2222
return Ok(message);

0 commit comments

Comments
 (0)