Skip to content

Commit

Permalink
Fix issue #111: Branch title is missing in failed github actions work…
Browse files Browse the repository at this point in the history
…flows
  • Loading branch information
openhands-agent committed Sep 28, 2024
1 parent 712cd0f commit d20f65e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/openhands-resolver-experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ jobs:
body: `A potential fix has been generated and a draft PR #${prNumber} has been created. Please review the changes.`
});
} else {
const branchName = fs.readFileSync('branch_name.txt', 'utf8').trim();
let branchName = '';
try {
branchName = fs.readFileSync('branch_name.txt', 'utf8').trim();
} catch (error) {
console.error('Error reading branch_name.txt:', error);
branchName = 'unknown';
}
github.rest.issues.createComment({
issue_number: issueNumber,
owner: context.repo.owner,
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/openhands-resolver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ jobs:
body: `A potential fix has been generated and a draft PR #${prNumber} has been created. Please review the changes.`
});
} else {
const branchName = fs.readFileSync('branch_name.txt', 'utf8').trim();
let branchName = '';
try {
branchName = fs.readFileSync('branch_name.txt', 'utf8').trim();
} catch (error) {
console.error('Error reading branch_name.txt:', error);
branchName = 'unknown';
}
github.rest.issues.createComment({
issue_number: issueNumber,
owner: context.repo.owner,
Expand Down

0 comments on commit d20f65e

Please sign in to comment.