File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
app/commands/progress/sync Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1515from app .utils .gh_cli_utils import (
1616 clone_with_custom_name ,
1717 fork ,
18+ get_prs ,
1819 get_username ,
1920 has_fork ,
21+ pull_request ,
2022)
2123from app .utils .git_cli_utils import add_all , add_remote , commit , push
2224from app .utils .gitmastery_utils import (
@@ -103,6 +105,18 @@ def on(ctx: click.Context) -> None:
103105 commit ("Sync progress with local machine" , verbose )
104106 push ("origin" , "main" , verbose )
105107
108+ prs = get_prs (PROGRESS_REPOSITORY_NAME , "main" , username , verbose )
109+ if len (prs ) == 0 :
110+ warn ("No pull request created for progress. Creating one now" )
111+ pull_request (
112+ "git-mastery/progress" ,
113+ "main" ,
114+ f"{ username } :main" ,
115+ f"[{ username } ] Progress" ,
116+ "Automated" ,
117+ verbose ,
118+ )
119+
106120 success ("You have setup the progress tracker for Git-Mastery!" )
107121
108122 gitmastery_config ["progress_remote" ] = True
You can’t perform that action at this time.
0 commit comments