mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Massenzio" <ma...@mesosphere.io>
Subject Re: Review Request 35777: Made post-reviews.py handle bad (or not) ReviewBoard URLs.
Date Wed, 01 Jul 2015 17:52:02 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35777/#review90076
-----------------------------------------------------------



support/post-reviews.py (lines 170 - 176)
<https://reviews.apache.org/r/35777/#comment143025>

    well, you did The Right Thing, using `re` :)
    how about taking it to its natural conclusion:
    
    PATTERN = re.compile('Review: (https://reviews.apache.org/r/[0-9]+)')
    
    then use: `re.search()` (instead of .match) and use `match.group(1)` to extract just the
URL.
    
    Looks to me like a better User Experience.


- Marco Massenzio


On July 1, 2015, 3:52 p.m., Michael Park wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35777/
> -----------------------------------------------------------
> 
> (Updated July 1, 2015, 3:52 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Marco Massenzio, and Till Toenshoff.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> (1) Handles the case where the `Review: ...` line isn't the last of the commit message.
> 
> ```
> 01596ce802669e9dac7dd24193f041cef3354830 - Fixed post-reviews.py hanging bug. (6 seconds
ago)
> 
> ReviewBoard URL must be the last line of the commit message!
> 
> Fixed post-reviews.py hanging bug.
> 
> Review: https://reviews.apache.org/r/35771
> 
> abcd
> ```
> 
> (2) Handles the case where the ReviewBoard URL is invalid.
> 
> ```
> af081a07234794f60a2575e0383ce537d7111c18 - Fixed post-reviews.py hanging bug. (29 seconds
ago)
> 
> Invalid ReviewBoard URL : 'https://reviews.apache.org/r/35771 abcd'
> ```
> 
> 
> Diffs
> -----
> 
>   support/post-reviews.py 10861a9eb9739a519732fef02a14dc4514463a8c 
> 
> Diff: https://reviews.apache.org/r/35777/diff/
> 
> 
> Testing
> -------
> 
> Modified the commit message with `git rebase` and ran `./support/post-reviews.py` to
observe the above error messages.
> Used the valid commit message for this patch and created it by running `./support/post-reviews.py`.
> 
> 
> Thanks,
> 
> Michael Park
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message