Julian wrote a script a while ago to retrieve patches from bugzilla and checkout the good commit to make sure the patches will apply cleanly. We could reuse the same logic for the auto-rebase script.
Created attachment 177829 [details] [review] Bug 39106: The auto-rebase script - Add --bugzilla Julian wrote a script a while ago to retrieve patches from bugzilla and checkout the good commit to make sure the patches will apply cleanly. This change reuses the same logic for the auto-rebase script. Test plan: 0. a. You will need to install REST::Client using cpanm: `cpanm REST::Client` b. You need the --confirm flag from git-bz, see https://gitlab.com/koha-community/git-bz/-/issues/14 1. Pick a bug number with patches that does not apply on current main 2. Use the auto_rebase script with the --bugzilla option 3. Enjoy
Created attachment 177830 [details] [review] Bug 39106: Add REST::Client to cpanfile
Not 100% a blocker, but cannot you use: * LWP::UserAgent * Mojo::UserAgent both are already dependencies (LWP.. explicitly, the Mojo one as part of Mojolicious).
Yes, we could avoid the new dependency, I just reused some existing code.
Created attachment 178104 [details] [review] Bug 39106: The auto-rebase script - Add --bugzilla Julian wrote a script a while ago to retrieve patches from bugzilla and checkout the good commit to make sure the patches will apply cleanly. This change reuses the same logic for the auto-rebase script. Test plan: 0. a. You will need to install REST::Client using cpanm: `cpanm REST::Client` b. You need the --confirm flag from git-bz, see https://gitlab.com/koha-community/git-bz/-/issues/14 1. Pick a bug number with patches that does not apply on current main 2. Use the auto_rebase script with the --bugzilla option 3. Enjoy Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 178105 [details] [review] Bug 39106: Add REST::Client to cpanfile Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(In reply to Jonathan Druart from comment #4) > Yes, we could avoid the new dependency, I just reused some existing code. Lazy :-P
Created attachment 178114 [details] [review] Bug 39106: The auto-rebase script - Add --bugzilla Julian wrote a script a while ago to retrieve patches from bugzilla and checkout the good commit to make sure the patches will apply cleanly. This change reuses the same logic for the auto-rebase script. Test plan: 0. a. You will need to install REST::Client using cpanm: `cpanm REST::Client` b. You need the --confirm flag from git-bz, see https://gitlab.com/koha-community/git-bz/-/issues/14 1. Pick a bug number with patches that does not apply on current main 2. Use the auto_rebase script with the --bugzilla option 3. Enjoy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 178115 [details] [review] Bug 39106: Add REST::Client to cpanfile Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Created attachment 178116 [details] [review] Bug 39106: Use LWP::UserAgent and add error checking This patch replaces the (newly introduced use of) REST::Client library with (the already existing in the dependencies) LWP::UserAgent. Bonus 1: validation on the response status is added to print a proper error message and die if bugzilla is not available Bonus 2: License added to the file Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Removing the dependency keyword. I'd vote for squashing the first two patches on merging into `main`.
Thanks!
Pushed for 25.05! Well done everyone, thank you!