-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Overload --json
to fetch via PR number
#2356
Conversation
Hm. Having some thoughts regarding UX. @sdushantha any of your own? Wondering if we should instead overload i.e. If bespoke, I would probably drop the short Reference tagged issue for targeted functionality. Feel free to weigh in yourself if you have any thoughts @bytexenon |
Regression tests ran at the time of this comment all PASS. Failures indicated are due only to an existing positive test target (BodyBuilding[.]com) shutting down. This target will be swapped out elsewhere and can be disregarded.
|
It does sound much better than adding the sherlock --json 9876 bytexenon Ultimately, the decision is yours |
Good catch. The # was just meant to better distinguish uri types (filepath, url, pull request), but I don't think it's really necessary. Let's do your version with just the number. Think you can make it happen cleanly? Additional notes for the current version. to be hopefully fixed in the new: When passing a non-PR number (i.e. of an Issue or Discussion), it errors out with |
Of course, I'll work on it
Got it, thanks for pointing that out. I'll make sure to add proper validation and improve the error messages |
Just confirming --- is this ready for review or are you looking to make some other tweaks? @bytexenon |
I think it's done. Sorry for the late response, @ppfeister |
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.
No worries, just wanted to make sure it was actually done first -- didn't want to jump the gun
Changes look good and seem to function as expected. Merging!
--pull-request
flag--json
to fetch via PR number
Introduces the
--pull-request PULL_REQUEST
and-pr PULL_REQUEST
flag. This flag accepts a pull request number, gets the head of the specified pull request, and fetches the latestdata.json
file from it.Additionally, I've added a check to ensure that the
--json
and--pull-request
flags are not used simultaneously. If both flags are used together, an error message will be displayed: "You cannot use both --json and --pull_request at the same time."Example usage:
Feel free to leave any feedback or request changes as necessary.
Fixes #2354