Clean quotes from code when submitting
This commit is contained in:
@@ -688,6 +688,7 @@ class GitHubTool(BaseTool):
|
|||||||
return error_message
|
return error_message
|
||||||
|
|
||||||
def _commit_file(self, file_path, content, commit_message):
|
def _commit_file(self, file_path, content, commit_message):
|
||||||
|
content.strip("'''")
|
||||||
self.logger.info(f"Committing file: {file_path} to branch: {self.current_branch} with message: '{commit_message}'")
|
self.logger.info(f"Committing file: {file_path} to branch: {self.current_branch} with message: '{commit_message}'")
|
||||||
if self.current_branch == "main":
|
if self.current_branch == "main":
|
||||||
error_message = "Action directly to main branch is not allowed. Please create and switch to a new branch first."
|
error_message = "Action directly to main branch is not allowed. Please create and switch to a new branch first."
|
||||||
|
|||||||
Reference in New Issue
Block a user