@@ -31,7 +31,7 @@ func StartWorkingOnIssue(config IssuectlConfig, issueID IssueID) error {
3131 return fmt .Errorf ("issueID already found in local configuration" )
3232 }
3333
34- Log .Infof ("Starting work on issue %v ..." , issueID )
34+ Log .Infof (" 🏗️ \t Preparing workspace for issue %v..." , issueID )
3535
3636 issueBackend , issueDirPath , err := initializeIssueBackendAndDir (config , profile , issueID )
3737 if err != nil {
@@ -43,11 +43,15 @@ func StartWorkingOnIssue(config IssuectlConfig, issueID IssueID) error {
4343 return err
4444 }
4545
46+ Log .Infof (" 🛬\t Cloning repositories %v" , repositories )
47+
4648 newIssue , err := createAndAddRepositoriesToIssue (config , profile , issueID , issueDirPath , branchName , branchName , repositories )
4749 if err != nil {
4850 return err
4951 }
5052
53+ Log .Infof (" 🫡\t Marking issue as In Progress in %v" , profile .IssueBackend )
54+
5155 if err := issueBackend .StartIssue ("" , "" , issueID ); err != nil {
5256 return err
5357 }
@@ -56,8 +60,8 @@ func StartWorkingOnIssue(config IssuectlConfig, issueID IssueID) error {
5660 return err
5761 }
5862
59- Log .Infof ("Workspace for %v ready! 🫡 " , issueID )
60- Log .Infof ("Run `issuectl workon %v` to open it in VS Code" , issueID )
63+ Log .Infof (" 🚀 \t Workspace for %v ready!" , issueID )
64+ Log .Infof (" 🧑💻 \t Run `issuectl workon %v` to open it in VS Code" , issueID )
6165 return nil
6266}
6367
@@ -201,14 +205,21 @@ func OpenPullRequest(issueID IssueID) error {
201205 return err
202206 }
203207
204- Log .Infof ("Opening PR for issue %v in %v" , issueID , profile .RepoBackend )
205-
206208 repo := config .GetRepository (profile .DefaultRepository )
209+
210+ Log .Infof (
211+ " 📂\t Opening PR for issue %v in %v/%v [%v]" ,
212+ issueID ,
213+ repo .Owner ,
214+ repo .Name ,
215+ profile .RepoBackend ,
216+ )
217+
207218 prId , err := repoBackend .OpenPullRequest (
208219 repo .Owner ,
209220 repo .Name ,
210221 fmt .Sprintf ("%v | %v" , issue .ID , issue .Name ),
211- fmt .Sprintf ("Resolves #%v" , issue .ID ),
222+ fmt .Sprintf ("Resolves #%v ✅ " , issue .ID ),
212223 "master" , // TODO: make configurable
213224 issue .BranchName ,
214225 )
@@ -220,7 +231,7 @@ func OpenPullRequest(issueID IssueID) error {
220231 if err != nil {
221232 return err
222233 }
223- Log .Infof ("Linking PR %v to issue %v in %v" , prId , issueID , profile .IssueBackend )
234+ Log .Infof (" 🔗 \t Linking PR %v to issue %v in %v" , prId , issueID , profile .IssueBackend )
224235
225236 return issueBackend .LinkIssueToRepo (repo .Owner , repo .Name , issueID , strconv .Itoa (* prId ))
226237}
@@ -231,11 +242,15 @@ func FinishWorkingOnIssue(issueID IssueID) error {
231242 profile := config .GetProfile (config .GetCurrentProfile ())
232243 repo := config .GetRepository (profile .DefaultRepository )
233244
245+ Log .Infof (" 🥂\t Finishing work on %v" , issueID )
246+
234247 issueBackend , err := getIssueBackendConfigurator (config .GetBackend (profile .IssueBackend ))
235248 if err != nil {
236249 return err
237250 }
238251
252+ Log .Infof (" 🏁\t Closing issue %v in %v" , issueID , profile .IssueBackend )
253+
239254 err = issueBackend .CloseIssue (
240255 repo .Owner ,
241256 repo .Name ,
@@ -245,16 +260,24 @@ func FinishWorkingOnIssue(issueID IssueID) error {
245260 return fmt .Errorf (errFailedToCloseIssue , err )
246261 }
247262
248- Log .Infof ("Cleaning up after work on issue %v" , issueID )
249-
250263 issue , found := config .GetIssue (issueID )
251264 if ! found {
252265 return errors .New (errIssueIDNotFound )
253266 }
254267
268+ Log .Infof (" 🧹\t Cleaning up issue workdir" )
269+
255270 if err := os .RemoveAll (issue .Dir ); err != nil {
256271 return err
257272 }
258273
259- return config .DeleteIssue (issueID )
274+ Log .Infof (" 🫥\t Removing issue config" )
275+
276+ if err := config .DeleteIssue (issueID ); err != nil {
277+ return err
278+ }
279+
280+ Log .Infof (" 👍\t All done!" )
281+
282+ return nil
260283}
0 commit comments