Support --web flag in issue and pr list - #1282
Conversation
eb22aed to
77a610f
Compare
| prListCmd.Flags().StringSliceP("label", "l", nil, "Filter by label") | ||
| prListCmd.Flags().StringSliceP("label", "l", nil, "Filter by labels") | ||
| prListCmd.Flags().StringP("assignee", "a", "", "Filter by assignee") | ||
| prListCmd.Flags().StringP("author", "A", "", "Filter by author") |
There was a problem hiding this comment.
Let's only add --author once it's supported in both web and non-web mode #1102. Otherwise, people might be mislead to try it without --web and will be greeted with an error.
|
@mislav I think I should shift to accepting a map then, rather than accepting a huge number of function arguments (seeing that even more filters would be added in the future). |
|
@AliabbasMerchant +1 on accepting a map, or—better yet—a struct |
|
@AliabbasMerchant You may merge trunk now with the latest issue filters 🙇♂️ |
|
@AliabbasMerchant Thank you for your ongoing hard work! 🎉 |
| "https://github.com/%s/pulls", | ||
| ghrepo.FullName(baseRepo), | ||
| ) | ||
| prListURL := generateRepoURL(baseRepo, "pulls") |
There was a problem hiding this comment.
So now URL generation is shifted to a separate function? Awesome!
| return err | ||
| } | ||
| fmt.Fprintf(cmd.ErrOrStderr(), "Opening %s in your browser.\n", openURL) | ||
| fmt.Fprintf(cmd.ErrOrStderr(), "Opening %s in your browser.\n", displayURL(openURL)) |
There was a problem hiding this comment.
Oh. I purposely did not use the displayURL function, thinking that it would be better to show the perfect URL, but okay 👍
There was a problem hiding this comment.
The URL-encoded query would be hard to read, so I've made a call to not display it. We also avoid printing query strings in other feedback messages.
Summary
closes #1228
I have tested it out from my side
Have also added an
--authorflag inpr list, and am making sure that it is allowed only with the--webflag