Skydio / revup

Effortlessly create and manage pull requests without changing branches. Powers a stacked diffs workflow with python and git "plumbing" commands.
https://github.com/Skydio/revup
MIT License
309 stars 59 forks source link

upload: Fix review graph comment #177

Closed brian-kubisiak-skydio closed 5 months ago

brian-kubisiak-skydio commented 5 months ago

If there are two PRs in a relative chain where one PR's URL is a prefix of another (e.g. when PR 24 is relative to PR 2), the review graph comment will incorrectly modify the second URL by inserting '**' at the start and in the middle of the URL. This is due to the naive string replacement checking for any occurance of each URL.

Fix this by searching instead for the URL followed by the review title and replacing them both at once instead of individually. This is also slightly more efficient since there are fewer strings allocated.

Signed-off-by: Brian Kubisiak brian@kubisiak.com

brian-kubisiak-skydio commented 5 months ago

Reviews in this chain: └https://github.com/Skydio/revup/pull/177 upload: Fix review graph comment

brian-kubisiak-skydio commented 5 months ago
# head base diff date summary
0 adbe2033 d29851a6 diff Apr 5 12:35 PM 1 file changed, 4 insertions(+), 3 deletions(-)