Skip to content

Commit 0e54cfc

Browse files
committed
format
1 parent cafeb2e commit 0e54cfc

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

cmd/tag-release-tui/main.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ const (
2828

2929
// Model represents the application state
3030
type model struct {
31-
state state
32-
tag string
33-
remote string
34-
currentBranch string
35-
latestTag string
36-
errors []string
37-
validationStep int
38-
executionStep int
39-
confirmed bool
40-
executed bool
41-
repoSlug string
42-
testMode bool
43-
releaseURL string
31+
state state
32+
tag string
33+
remote string
34+
currentBranch string
35+
latestTag string
36+
errors []string
37+
validationStep int
38+
executionStep int
39+
confirmed bool
40+
executed bool
41+
repoSlug string
42+
testMode bool
43+
releaseURL string
4444
pollingAttempts int
45-
width int
46-
height int
45+
width int
46+
height int
4747
}
4848

4949
// Messages
@@ -212,9 +212,9 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
212212
m.executed = true
213213
return m, nil
214214
}
215-
215+
216216
m.pollingAttempts = msg.attempt
217-
217+
218218
// Check if release is available
219219
releaseURL := fmt.Sprintf("https://github.com/%s/releases/tag/%s", msg.repoSlug, msg.tag)
220220
resp, err := http.Get(releaseURL)
@@ -227,7 +227,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
227227
return m, nil
228228
}
229229
}
230-
230+
231231
// Continue polling
232232
return m, startPollingTicker(msg.repoSlug, msg.tag, msg.attempt)
233233
}
@@ -374,8 +374,8 @@ func (m model) renderPollingRelease() string {
374374
content += successStyle.Render("✅ 'latest-release' tag has been updated") + "\n\n"
375375

376376
content += subtitleStyle.Render("🔍 Polling for GitHub release...") + "\n\n"
377-
378-
dots := strings.Repeat(".", (m.pollingAttempts % 3) + 1)
377+
378+
dots := strings.Repeat(".", (m.pollingAttempts%3)+1)
379379
content += warningStyle.Render(fmt.Sprintf("⋯ Checking GitHub releases page%s", dots)) + "\n"
380380
content += fmt.Sprintf(" Attempt %d/30 (checking every 10 seconds)\n", m.pollingAttempts+1)
381381
content += "\n"
@@ -404,7 +404,7 @@ func (m model) renderComplete() string {
404404
} else {
405405
content += successStyle.Render("✅ Successfully tagged and pushed release "+m.tag) + "\n"
406406
content += successStyle.Render("✅ 'latest-release' tag has been updated") + "\n"
407-
407+
408408
if m.releaseURL != "" {
409409
content += successStyle.Render("✅ Draft release is now available!") + "\n\n"
410410
content += subtitleStyle.Render("🎉 Release "+m.tag+" has been created!") + "\n\n"
@@ -627,7 +627,7 @@ func pollForRelease(repoSlug, tag string) tea.Cmd {
627627
return releaseFoundMsg{url: releaseURL}
628628
}
629629
}
630-
630+
631631
// Start polling with ticker
632632
return startPollingTicker(repoSlug, tag, 0)
633633
})

0 commit comments

Comments
 (0)