Skip to content

feat: Add ThrottledAt field to HookDelivery - #4518

Merged
gmlewis merged 1 commit into
google:masterfrom
MarcHuang168:hookdelivery-throttled-at
Sep 4, 2026
Merged

gmlewis merged 1 commit into
google:masterfrom
MarcHuang168:hookdelivery-throttled-at

Conversation

@MarcHuang168

Copy link
Copy Markdown
Contributor

Adds the throttled_at field to HookDelivery. It is documented in the hook-delivery / hook-delivery-item OpenAPI schemas, and confirmed present in the live list-deliveries and get-delivery responses for a real push event on my fork; it was previously dropped on decode.

Note on verification: the drop was observed end-to-end through ListHookDeliveries on the live API (raw body has the key, decoded struct does not). For GetHookDelivery the live response also carries the key, but its value was null on my fork (the delivery was not throttled), so the typed path can't show a difference there; both methods decode into the same HookDelivery struct, and the non-null case is covered by the updated unit tests.

Updated the existing ListHookDeliveries and GetHookDelivery tests to cover the new field.

Fixes #4517

AI assistance: Claude was used to diff go-github's structs against GitHub's OpenAPI description and to draft the edits; the field was verified against the live API, and the change was applied, tested (script/fmt.sh, script/test.sh, script/lint.sh) and reviewed locally by me.

@gmlewis gmlewis added the NeedsReview PR is awaiting a review before merging. label Sep 4, 2026
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (1217174) to head (7c8900c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4518   +/-   ##
=======================================
  Coverage   98.53%   98.53%           
=======================================
  Files         195      195           
  Lines       17795    17795           
=======================================
  Hits        17534    17534           
  Misses        261      261           

☔ View full report in Codecov by Harness.
📢 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.

@gmlewis gmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @MarcHuang168!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.

cc: @stevehipwell - @alexandear - @Not-Dhananjay-Mishra

@Not-Dhananjay-Mishra Not-Dhananjay-Mishra left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@gmlewis

gmlewis commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Thank you, @Not-Dhananjay-Mishra!
Merging.

@gmlewis gmlewis removed the NeedsReview PR is awaiting a review before merging. label Sep 4, 2026
@gmlewis
gmlewis merged commit b8acf75 into google:master Sep 4, 2026
15 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.

HookDelivery is missing the throttled_at field returned by the API

3 participants