Hi Christian, Thank you very much for your quick detailed advice.
After numerous attempts on rbt version 0.7.7, I was unable to successfully post and then retrieve any extra variables with --field local_branch=<your determined branch>. Fortunately, from your example arguments '--status=pending --only-fields=id,extra_data --only-links=', I learned how to select what I needed from /api/review-requests/ that already had our local branch names in it. My use of rbt get-api this way is returning about 4 times as much as the query you suggested, but that's ok for now. I appreciate the info you shared about version 0.8, having local branch info. When we switch to that version, we can work on improving our script. Now that I can obtain the review ID, I can use -r <ID>, and with my tests so far, it works fine. Without your assistance, I'm sure I would still be stuck trying to figure this out. Thank you so much, and best regards, Terry L. Bringazi On Wednesday, January 4, 2017 at 6:11:54 PM UTC-8, Terry Bringazi wrote: > > Hello, > > I'm having a specific problem in trying to automate our use of 'rbt post' > in a git post-commit environment. Any advice or solution would be > appreciated. > > In our current workflow, developers commit and push to their own branches > prior to peer review, and then we review changes in those branches before > merging from their branches. > > I'm trying to automate calls to the rbt command for changes that have > already been made to developer branches prior to merging from those > branches. Basically, on the first 'rbt post', I want to call it without a > '-u', and for all subsequent calls for the same branch to include a '-u'. > > MY PROBLEM is, I have not yet been able to create a script that can > determine if 'rbt post' should be called with an update option '-u' or not. > > My script currently calls rbt post as follows, (Note that $RB_UPDATE is > equal to either '-u' or ''): > rbt post --api-token $RB_API_TOKEN $RB_UPDATE --guess-summary > --guess-description --branch $BRANCH --tracking-branch $PARENT_BRANCH -d -p > $commit_id > > I've found no efficient automated way to use 'rbt api-get' on > /review-requests/ to determine if rbt has any commit records for a > developer owned branch. My thinking was that if reviewboard knows about a > prior commit for the branch, then for any subsequent 'rbt post', $RB_UPDATE > should be set to '-u'. I also tried using curl over http with a GET, but > did not find the right incantation. > > Is there an efficient way to automatically determine if 'rbt post' should > be called with an update option '-u' or not? > > Does my approach for automating use of reviewboard seem reasonable, or is > there a better strategy that I should consider? > > Thank you, > > Terry L. Bringazi > > > -- Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/ Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/ Happy user? Let us know! https://www.reviewboard.org/users/ --- You received this message because you are subscribed to the Google Groups "reviewboard" group. To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.