-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: provide repository contributors insights #30
Conversation
c06f01e
to
6e3ea56
Compare
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.
e7b0bb5
to
0c02404
Compare
I see the difference being the interactivity you get from the show. I didn't want to increase scope on #24 while we explore the basic interaction, but think we can do some more high level insights from commits and prs as well. |
@cecobask - the Go API client has landed ✨ https://github.com/open-sauced/go-api !!!! Are you able to give that a try? It likely has some sharp edges so please open issues in that repo as the need arises! |
Can you change this PR's target branch to be For further reading: |
fabf3f5
to
eb70fb1
Compare
@jpmcb, Done 👍🏻 Another review session is in order 😄
Until open-sauced/go-api#2 is resolved, |
eb70fb1
to
bf539a5
Compare
The problems with open-sauced/go-api were resolved. |
cmd/root/root.go
Outdated
} | ||
return nil | ||
}, | ||
SilenceUsage: true, |
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.
Every time a command returned an error, the help
output was also printed, together with the error.
I think this is cleaner. The help output will still be shown in case the user entered invalid input for commands or passed --help
flag.
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.
Every time a command returned an error, the help output was also printed
We should still dump the help message when an error is returned since it's usually due to some misconfiguration of flags or values. The standard approach in Cobra CLIs is to print the help message along with the error so the user can have a quick loop to correcting it.
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.
❯ ./build/pizza insights contributors
Error: must pass either file or repos flag
Hmmm I suppose I could be convinced that this is cleaner and easier to grok. What do others think?
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 think we still want some sort of user feedback. For example, in the github CLI, they return some helpful list of available commands:
❯ gh pr woof
unknown command "woof" for "gh pr"
Usage: gh pr <command> [flags]
Available commands:
checkout
checks
close
comment
create
diff
edit
list
lock
merge
ready
reopen
review
status
unlock
view
So, for now, until we figure out a better strategy, let's just dump the help message for that command in order to provide some fast feedback for the user.
bf539a5
to
71be66d
Compare
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.
Thank you for the feedback, @jpmcb!
I've updated the code based on your suggestions.
Please, review at your convenience 👍🏻
bad32a5
to
f20fd71
Compare
Happy to provide the feedback! This is looking good, great work. Huge lift. This is on my docket to dive back into today! |
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.
This is getting very close!!!! Nice work!!!
cmd/root/root.go
Outdated
} | ||
return nil | ||
}, | ||
SilenceUsage: true, |
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 think we still want some sort of user feedback. For example, in the github CLI, they return some helpful list of available commands:
❯ gh pr woof
unknown command "woof" for "gh pr"
Usage: gh pr <command> [flags]
Available commands:
checkout
checks
close
comment
create
diff
edit
list
lock
merge
ready
reopen
review
status
unlock
view
So, for now, until we figure out a better strategy, let's just dump the help message for that command in order to provide some fast feedback for the user.
f20fd71
to
6e95a76
Compare
Thanks, @jpmcb! I've updated the branch with the latest changes 👍🏻 |
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.
Great work!! Just one small nit on a regression I noticed in using a custom endpoint for the pizza service (which I typically do for testing local changes). This might be an issue with how the client generates it's endpoints. Otherwise, let's get this in! 💪🏼
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 have been watching this quietly in the background and can say it works as expected for me.
re: localhost. It might be worth setting up some follow up issues to identify things we can fix and enhance after this is merged.
Something top of mind is making these contributor insights actionable with some context on % and story telling.
Perhaps we get @isabensusan to assist in adding this to the design backlog to assist in representing this in the UI.
## [1.0.0-beta.4](v1.0.0-beta.3...v1.0.0-beta.4) (2023-09-06) ### 🍕 Features * provide repository contributors insights ([#30](#30)) ([d16091f](d16091f))
## 1.0.0 (2023-10-11) ### 🤖 Build System * sematic bin release, npm ([7b4607e](7b4607e)) ### 🔁 Continuous Integration * Update @open-sauced/[email protected] and compliance.yaml ([#33](#33)) ([146b6b7](146b6b7)) ### 🐛 Bug Fixes * Uses correct generated token when checking out cli repo in release ([#44](#44)) ([1e0c9f1](1e0c9f1)) ### 🍕 Features * Add install instructions and script for pizza CLI ([#26](#26)) ([421a429](421a429)) * Add posthog telemetry integration ([#37](#37)) ([9829f49](9829f49)) * cli auth ([#21](#21)) ([34728fb](34728fb)) * GitHub action to build and upload Go artifacts after release created ([#22](#22)) ([ad187a9](ad187a9)) * Http Client for accessing OpenSauced API client ([#23](#23)) ([ec2b357](ec2b357)) * Leverage the GITHUB_APP_TOKEN for releases ([#32](#32)) ([e0a25e0](e0a25e0)) * npm i -g pizza ([73291d1](73291d1)) * Pizza show ([#24](#24)) ([72f21ce](72f21ce)) * provide repository contributors insights ([#30](#30)) ([d16091f](d16091f)) * provide repository insights ([#38](#38)) ([dc148d6](dc148d6)) * repo-query support ([199cfd7](199cfd7)) * update bin name release.yaml ([6b21cb8](6b21cb8)) * Version command for CLI based on release builds ([#36](#36)) ([9f3eedc](9f3eedc))
Description
This pull request adds the feature to provide repository contributors insights.
What type of PR is this? (check all applicable)
Related Tickets & Documents
Closes #5
Mobile & Desktop Screenshots/Recordings
File contents:
Usage with
--file
/-f
flagUsage with
--repos
/-r
flagIgnore non-existent and non-indexed repositories
Error when neither
--file
or--repos
flag was providedError when both
--file
and--repos
flags were providedAdded tests?
Added to documentation?