File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
plugins/titan-plugin-github/titan_plugin_github/steps Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,20 @@ def create_pr_step(ctx: WorkflowContext) -> WorkflowResult:
9999 metadata = {"pr_number" : pr ["number" ], "pr_url" : pr ["url" ]},
100100 )
101101 except GitHubAPIError as e :
102- ctx .textual .error_text (f"Failed to create pull request: { e } " )
102+ error_msg = str (e )
103+
104+ # Check for common errors and provide helpful guidance
105+ if "No commits between" in error_msg or "Head sha can't be blank" in error_msg :
106+ ctx .textual .error_text (f"Failed to create pull request: { e } " )
107+ ctx .textual .text ("" )
108+ ctx .textual .warning_text ("💡 The branch might not be pushed to the remote repository." )
109+ ctx .textual .text ("" )
110+ ctx .textual .dim_text ("To fix this, push your branch and try again:" )
111+ ctx .textual .dim_text (f" git push -u origin { head } " )
112+ ctx .textual .text ("" )
113+ else :
114+ ctx .textual .error_text (f"Failed to create pull request: { e } " )
115+
103116 ctx .textual .end_step ("error" )
104117 return Error (f"Failed to create pull request: { e } " )
105118 except Exception as e :
You can’t perform that action at this time.
0 commit comments