Skip to content
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

Feature: pizza show <git-repo-url> for a realtime dashboard of repo activity #9

Closed
2 tasks done
jpmcb opened this issue Jul 21, 2023 · 9 comments
Closed
2 tasks done
Assignees

Comments

@jpmcb
Copy link
Member

jpmcb commented Jul 21, 2023

Type of feature

🍕 Feature

Current behavior

Via the CLI, there's not a good way to show a realtime view of events happening on a repository.

Suggested solution

We should implement a show command that takes a git repo URL and displays the realtime events (commits) for that repo:

$ pizza show <git-repo-url>

This could use some Terminal-User-Interface (TUI) to makeup a nice looking display.

The use-case here is maybe an office with a centralized monitor where people want to display a terminal with these realtime metrics of a repo they are watching.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@bdougie
Copy link
Member

bdougie commented Jul 25, 2023

Perhaps there are some existing libraries or examples we can borrow from for the visualizations. I shared the nba-go as my favorite example, but also citing for others.

Also the charmcli project might have some interesting visualizations in their org or in the the works. Happy to reach out if a collaboration is of interest.

@k1nho
Copy link
Contributor

k1nho commented Jul 25, 2023

Also the charmcli project might have some interesting visualizations in their org or in the the works. Happy to reach out if a collaboration is of interest.

Yep, lots of the Charm libs use Go. BubbleTea, Bubbles, and Lipgloss are the ones I've seen used the most in combination to create TUI's

@k1nho
Copy link
Contributor

k1nho commented Aug 14, 2023

@jpmcb Do we know the fields to be displayed for this? and are we are requesting to pizza-oven for some commit data periodically after some seconds to be realtime ? I think we may be able to leverage Charm Bubbles table component structure for this. I can explore this one.

@jpmcb
Copy link
Member Author

jpmcb commented Aug 15, 2023

I think the actual data to gather is still abit undefined: we want to use the open sauced API (which you can look at the swagger doc here: https://api.opensauced.pizza)

Maybe to start, we can get the

That will at least prove out some of the structure around getting this started.

@bdougie
Copy link
Member

bdougie commented Aug 15, 2023

If we have commits data already we can visualize commits over a time period in a line graph, similar to how we do in the UI.

@k1nho
Copy link
Contributor

k1nho commented Aug 15, 2023

New contributors for a repo: https://api.opensauced.pizza/#/Contributors%20service/newPullRequestContributors
Churn contributors for a repo: https://api.opensauced.pizza/#/Contributors%20service/findAllChurnPullRequestContributors

It seems these two endpoints are broken atm, just returning 500 status. v1/contributors/insights/recent and v1/contributors/search seem to be the only two working.

@jpmcb
Copy link
Member Author

jpmcb commented Aug 15, 2023

@k1nho - how are you using the API endpoint?

For new contributors, this works fine for me:

curl -X 'GET' \
  'https://api.opensauced.pizza/v1/contributors/insights/new?page=1&limit=10&range=30&topic=javascript&repo=open-sauced%2Finsights&repoIds=501028599' \
  -H 'accept: application/json'

And for churn, this also works:

curl -X 'GET' \
  'https://api.opensauced.pizza/v1/contributors/insights/churn?page=1&limit=10&range=30&repoIds=501028599' \
  -H 'accept: application/json'

501028599 is the repo id in the DB for the open-sauced/insights repo.

The new endpoint is abit wonky since it expects those query params that don't make alot of sense: i.e., topic and name doesn't make alot of sense.

@k1nho
Copy link
Contributor

k1nho commented Aug 15, 2023

Oh ok this works! I was just trying the swagger one, but it looks like without the repoIds it fails

@k1nho k1nho mentioned this issue Aug 16, 2023
19 tasks
@jpmcb
Copy link
Member Author

jpmcb commented Oct 3, 2023

Closed by #24

@jpmcb jpmcb closed this as completed Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants