tomar Posted May 16, 2019 Report Share Posted May 16, 2019 Hey all, Been building a fun little tool to keep our small dev team apprised of code review events in on our discord server. Currently it's able to identify newly created code reviews, changes in status and changes in assignee. The one remaining function I'd really like to add is the addition of code review comments, but I cannot find any way to access these outside the full PlasticSCM GUI. Pretty much all the other functionality works using cm find review where ... Nothing in the "cm find" documentation suggests that looking up review comments is possible, but I'm wondering if anyone here has any ideas or knows anything that I don't. Also, this is on Plastic Cloud, so server-side triggers are not currently an option as far as I know. Link to comment Share on other sites More sharing options...
calbzam Posted May 16, 2019 Report Share Posted May 16, 2019 Hi Tomar, Checking the "cm find" guide: https://www.plasticscm.com/documentation/cmfind/plastic-scm-version-control-query-system-guide#Codereviews You can use "comment" in the filtering options for the query. Is this what you need, right? Regards, Carlos. Link to comment Share on other sites More sharing options...
tomar Posted May 16, 2019 Author Report Share Posted May 16, 2019 I see what you mean, but without "comment" in the format/output field, I have no way to either read the comments' contents or compare to any previous state. Link to comment Share on other sites More sharing options...
calbzam Posted May 23, 2019 Report Share Posted May 23, 2019 Yes, I'm afraid at the moment "comment "is not available in the format field. We could include it as a feature request. Regards, Carlos. 1 Link to comment Share on other sites More sharing options...
tomar Posted May 23, 2019 Author Report Share Posted May 23, 2019 Because of the one-to-many relationship of a code review to its associated comments, it might be a good idea to make "review_comment" (or something similar) its own object type with review_id acting like a foreign key. Then it could be queried like: cm find review_comment where review_id = 5555555 Which would then return each associated comments of that review. Obviously wouldn't have to be exactly that, but hopefully my intent makes sense. What would be the proper channel to make this feature request? Link to comment Share on other sites More sharing options...
calbzam Posted May 30, 2019 Report Share Posted May 30, 2019 I think something like the following would also work: cm find review where id=123 --format={comment} We need to add "comment" as an output option. We would appreciate if you also add the request to our user voice system: https://plasticscm.uservoice.com Link to comment Share on other sites More sharing options...
tomar Posted May 30, 2019 Author Report Share Posted May 30, 2019 Sweet! I added your suggestion as a comment on the uservoice I created yesterday.https://plasticscm.uservoice.com/forums/15467-general/suggestions/37766653-programatically-access-code-review-comments Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now