Skip to content

Conversation

@brooksn
Copy link
Contributor

@brooksn brooksn commented Dec 11, 2023

This PR adds a new command watch_repo. It is a terminal user interface to list Drone builds, pull requests, and GitHub releases, and to be alerted to their completion.

example

Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
@brooksn brooksn changed the title [WIP] watch tui Add watch_repo Dec 18, 2023
@brooksn brooksn marked this pull request as ready for review December 18, 2023 20:05
Signed-off-by: Brooks Newberry <[email protected]>
@@ -0,0 +1,41 @@
package main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can any of these things be made into a package to be reused by other utils in the repo?

"time"

"github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this import alias is necessary.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it is necessary, but docs and examples usually use this alias

return a, nil
}
case error:
fmt.Println("got an error", msg)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is this rendered or output?

@@ -0,0 +1,22 @@
Output example.gif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?!?!?! What's this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is for recording that cool gif using VHS

GitHubToken string
}

func newConfig(path string) (*config, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to pass in path?

cd cmd/$@ && $(MAKE)

.PHONY: watch_repo
semv:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
semv:
watch_repo:

@tashima42
Copy link
Contributor

tashima42 commented Dec 19, 2023

When running the command for the first time, it couldn't find the config. The command should probably give some instructions on how to do it, or create itself the config file.

failed to load config: open /Users/pedrosuse/.ecm-distro-tools/watch_repo/watch_list.json: no such file or directory

func (a addItem) repoInputView() string {
tpl := "What is the repo?\n\n"
tpl += a.itemRepo.View()
tpl += "\n\n" + subtle.Render("enter: save") + dot + subtle.Render("q, esc: quit") + "\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

q won't quit, since it is an input

Suggested change
tpl += "\n\n" + subtle.Render("enter: save") + dot + subtle.Render("q, esc: quit") + "\n"
tpl += "\n\n" + subtle.Render("enter: save") + dot + subtle.Render("esc: quit") + "\n"

@briandowns
Copy link
Contributor

I think we can close this in favor of adding this same functionality to the release command.

@brooksn
Copy link
Contributor Author

brooksn commented Jan 30, 2024

Closed in favor of #355

@brooksn brooksn closed this Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants