-
Notifications
You must be signed in to change notification settings - Fork 34
Add watch_repo #318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add watch_repo #318
Conversation
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]>
Signed-off-by: Brooks Newberry <[email protected]>
Signed-off-by: Brooks Newberry <[email protected]>
| @@ -0,0 +1,41 @@ | |||
| package main | |||
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?!?!?! What's this?
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| semv: | |
| watch_repo: |
|
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. |
| 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" |
There was a problem hiding this comment.
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
| 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" |
|
I think we can close this in favor of adding this same functionality to the release command. |
|
Closed in favor of #355 |
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.