mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-08 22:38:05 -05:00
[Resolver]: Rename success_explanation to result_explanation for better clarity (#5724)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
12
.github/workflows/openhands-resolver.yml
vendored
12
.github/workflows/openhands-resolver.yml
vendored
@@ -321,7 +321,7 @@ jobs:
|
||||
|
||||
let prNumber = '';
|
||||
let branchName = '';
|
||||
let successExplanation = '';
|
||||
let resultExplanation = '';
|
||||
|
||||
try {
|
||||
if (success) {
|
||||
@@ -336,16 +336,16 @@ jobs:
|
||||
|
||||
try {
|
||||
if (!success){
|
||||
// Read success_explanation from JSON file for failed resolution
|
||||
// Read result_explanation from JSON file for failed resolution
|
||||
const outputFilePath = path.resolve('/tmp/output/output.jsonl');
|
||||
if (fs.existsSync(outputFilePath)) {
|
||||
const outputContent = fs.readFileSync(outputFilePath, 'utf8');
|
||||
const jsonLines = outputContent.split('\n').filter(line => line.trim() !== '');
|
||||
|
||||
if (jsonLines.length > 0) {
|
||||
// First entry in JSON lines has the key 'success_explanation'
|
||||
// First entry in JSON lines has the key 'result_explanation'
|
||||
const firstEntry = JSON.parse(jsonLines[0]);
|
||||
successExplanation = firstEntry.success_explanation || '';
|
||||
resultExplanation = firstEntry.result_explanation || '';
|
||||
}
|
||||
}
|
||||
} catch (error){
|
||||
@@ -364,8 +364,8 @@ jobs:
|
||||
} else if (!success && branchName) {
|
||||
let commentBody = `An attempt was made to automatically fix this issue, but it was unsuccessful. A branch named '${branchName}' has been created with the attempted changes. You can view the branch [here](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/${branchName}). Manual intervention may be required.`;
|
||||
|
||||
if (successExplanation) {
|
||||
commentBody += `\n\nAdditional details about the failure:\n${successExplanation}`;
|
||||
if (resultExplanation) {
|
||||
commentBody += `\n\nAdditional details about the failure:\n${resultExplanation}`;
|
||||
}
|
||||
|
||||
github.rest.issues.createComment({
|
||||
|
||||
Reference in New Issue
Block a user