Skip to content

Commit

Permalink
remove hardcoded branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
pgoos committed Jan 23, 2025
1 parent 0c0ef5f commit 69487ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions packages/plugin-github/src/plugins/createCommit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,20 @@ export const createCommitAction: Action = {
const repoPath = getRepoPath(content.owner, content.repo);

try {
await checkoutBranch(repoPath, "realitySpiral/demoPR", true);
await checkoutBranch(repoPath, content.branch, true);
await writeFiles(repoPath, content.files);
const commit = await commitAndPushChanges(
repoPath,
content.message,
"realitySpiral/demoPR"
content.branch
);
const hash = commit.commit;
elizaLogger.info(
`Commited changes to the repository ${content.owner}/${content.repo} successfully to branch 'realitySpiral/demoPR'! commit hash: ${hash}`
`Commited changes to the repository ${content.owner}/${content.repo} successfully to branch '${content.branch}'! commit hash: ${hash}`
);
if (callback) {
callback({
text: `Changes commited to repository ${content.owner}/${content.repo} successfully to branch 'realitySpiral/demoPR'! commit hash: ${hash}`,
text: `Changes commited to repository ${content.owner}/${content.repo} successfully to branch '${content.branch}'! commit hash: ${hash}`,
attachments: [],
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-github/src/plugins/interactWithPR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ export const implementFeatureAction: Action = {
JSON.stringify(codeFileChangesContent, null, 2)
);

message.content.text = `Commit changes to the repository ${content.owner}/${content.repo} on branch realitySpiral/demoPR with the commit message: ${content.feature}`;
message.content.text = `Commit changes to the repository ${content.owner}/${content.repo} on branch '${content.branch}' with the commit message: ${content.feature}`;

// Commit changes
const commit = await createCommitAction.handler(
Expand Down

0 comments on commit 69487ce

Please sign in to comment.