Skip to content

refactor: use params for all other URL constructions#482

Merged
mergify[bot] merged 1 commit intoopenSUSE:masterfrom
okurz:feature/use_proper_url_building_with_params
Apr 20, 2026
Merged

refactor: use params for all other URL constructions#482
mergify[bot] merged 1 commit intoopenSUSE:masterfrom
okurz:feature/use_proper_url_building_with_params

Conversation

@okurz
Copy link
Copy Markdown
Member

@okurz okurz commented Apr 13, 2026

Motivation:
Consistently use the 'params' argument for URL query parameters
across the codebase to avoid manual string manipulation and ensure
proper encoding.

Design Choices:

  • Refactored get_json and get_json_list in openqabot/loader/gitea.py
    to support params and updated callers.
  • Updated get_aggregate_settings_data in openqabot/loader/qem.py to
    pass parameters via params.
  • Refactored get_older_jobs in openqabot/openqa.py to use positional
    arguments for params as expected by openqa_client.
  • Updated relevant test mocks in tests/test_giteasync.py and
    tests/test_loader_qem.py.

Benefits:

  • Code consistency and readability.
  • Robust handling of query parameters across different modules.

@okurz okurz changed the title refactor: use params for all other URL constructions PART 3: refactor: use params for all other URL constructions - After #480 Apr 13, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (f2d9742) to head (5cfe77d).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #482   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           97        97           
  Lines         9690      9690           
  Branches       514       514           
=========================================
  Hits          9690      9690           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@okurz okurz force-pushed the feature/use_proper_url_building_with_params branch 4 times, most recently from 4395e26 to 19b0972 Compare April 16, 2026 20:04
@okurz okurz changed the title PART 3: refactor: use params for all other URL constructions - After #480 refactor: use params for all other URL constructions Apr 17, 2026
@okurz okurz marked this pull request as ready for review April 17, 2026 19:53
Motivation:
Consistently use the 'params' argument for URL query parameters
across the codebase to avoid manual string manipulation and ensure
proper encoding.

Design Choices:
- Refactored `get_json` and `get_json_list` in `openqabot/loader/gitea.py`
  to support `params` and updated callers.
- Updated `get_aggregate_settings_data` in `openqabot/loader/qem.py` to
  pass parameters via `params`.
- Refactored `get_older_jobs` in `openqabot/openqa.py` to use positional
  arguments for params as expected by `openqa_client`.
- Updated relevant test mocks in `tests/test_giteasync.py` and
  `tests/test_loader_qem.py`.

Benefits:
- Code consistency and readability.
- Robust handling of query parameters across different modules.

Related issue: openSUSE#480
@okurz okurz force-pushed the feature/use_proper_url_building_with_params branch from 19b0972 to 5cfe77d Compare April 20, 2026 08:51
Copy link
Copy Markdown
Member

@kalikiana kalikiana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Apr 20, 2026

This pull request, with head sha 5cfe77d82b2cb365e1ae8c0e02a1a552fbf66d4b, has been successfully merged with fast-forward by Mergify.

This pull request will be automatically closed by GitHub.

As soon as GitHub detects that the sha 5cfe77d82b2cb365e1ae8c0e02a1a552fbf66d4b is part of the master branch, it will mark this pull request as merged.

It is possible for this pull request to remain open if this detection does not happen, this usually happens when a force-push is done on this branch feature/use_proper_url_building_with_params, this means GitHub will fail to detect the merge.

@mergify mergify bot merged commit 5cfe77d into openSUSE:master Apr 20, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants