Fixed create a PR first
This commit is contained in:
@ -17,6 +17,7 @@ from src.workflows.repoSummarizer.docs_sections import (
|
|||||||
INITIAL_SECTIONS,
|
INITIAL_SECTIONS,
|
||||||
FINAL_SECTIONS,
|
FINAL_SECTIONS,
|
||||||
)
|
)
|
||||||
|
from prometheus_swarm.tools.git_operations.implementations import commit_and_push
|
||||||
|
|
||||||
|
|
||||||
class Task:
|
class Task:
|
||||||
@ -120,7 +121,6 @@ class RepoSummarizerWorkflow(Workflow):
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
self.setup()
|
self.setup()
|
||||||
|
|
||||||
# Create a feature branch
|
# Create a feature branch
|
||||||
log_section("CREATING FEATURE BRANCH")
|
log_section("CREATING FEATURE BRANCH")
|
||||||
branch_phase = phases.BranchCreationPhase(workflow=self)
|
branch_phase = phases.BranchCreationPhase(workflow=self)
|
||||||
@ -137,6 +137,16 @@ class RepoSummarizerWorkflow(Workflow):
|
|||||||
# Store branch name in context
|
# Store branch name in context
|
||||||
self.context["head"] = branch_result["data"]["branch_name"]
|
self.context["head"] = branch_result["data"]["branch_name"]
|
||||||
log_key_value("Branch created", self.context["head"])
|
log_key_value("Branch created", self.context["head"])
|
||||||
|
try:
|
||||||
|
commit_and_push(message="empty commit", allow_empty=True)
|
||||||
|
self.create_pull_request()
|
||||||
|
except Exception as e:
|
||||||
|
log_error(e, "Failed to commit and push")
|
||||||
|
return {
|
||||||
|
"success": False,
|
||||||
|
"message": "Failed to commit and push",
|
||||||
|
"data": None,
|
||||||
|
}
|
||||||
|
|
||||||
# Classify repository
|
# Classify repository
|
||||||
repo_classification_result = self.classify_repository()
|
repo_classification_result = self.classify_repository()
|
||||||
|
Reference in New Issue
Block a user