Update the GitHub support to use the modern HTTP functionality.

Review Request #11200 — Created Sept. 24, 2020 and updated

chipx86
Review Board
release-4.0.x
11199
11204
reviewboard

The GitHub backend has been wrapping the legacy JSON HTTP functions for
years now. Review Board 4.0 introduced new HTTP functionality that
standardizes error handling, post-request handling, header access, and
more, which was largely based off the needs from the GitHub support.
Until now, though, GitHub has retained its own implementation.

This change redoes the GitHub code to use the modern HTTP support. For
compatibility, some legacy functions (api_get(), api_post(), and
api_delete()) remain as deprecated wrappers, but all internal code is
now updated to use the standard HTTP functions. This will make the code
more maintainable going forward.

Unit tests pass on Python 2.7, 3.6, 3.7, and 3.8.

Summary
Update the GitHub support to use the modern HTTP functionality.
Description From Last Updated

E722 do not use bare except'

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

chipx86
Review request changed

Change Summary:

Fixed a bare except:.

Commits:

Summary
-
Update the GitHub support to use the modern HTTP functionality.
+
Update the GitHub support to use the modern HTTP functionality.

Depends On:

+11199 - Add header normalization and fetching for hosting service HTTP support.

Diff:

Revision 2 (+264 -274)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
david
  1. Ship It!
  2. 
      
Loading...