Summary: | Improve the auto-rebase script to retrieve patches from bugzilla | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | Pushed to main --- | QA Contact: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
25.05.00
|
|
Circulation function: | |||
Bug Depends on: | 38664 | ||
Bug Blocks: | |||
Attachments: |
Bug 39106: The auto-rebase script - Add --bugzilla
Bug 39106: Add REST::Client to cpanfile Bug 39106: The auto-rebase script - Add --bugzilla Bug 39106: Add REST::Client to cpanfile Bug 39106: The auto-rebase script - Add --bugzilla Bug 39106: Add REST::Client to cpanfile Bug 39106: Use LWP::UserAgent and add error checking |
Description
Jonathan Druart
2025-02-12 10:01:12 UTC
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! |