Skip to content

Clean up duplicate action log fields and deprecated OAuth2 transport - #162

Merged
FranciscoKurpiel merged 2 commits into
mainfrom
fix/minor-log-and-oauth2-cleanups
Oct 27, 2026
Merged

FranciscoKurpiel merged 2 commits into
mainfrom
fix/minor-log-and-oauth2-cleanups

Conversation

@FranciscoKurpiel

@FranciscoKurpiel FranciscoKurpiel commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR cleans up two minor logging warnings observed in CI:

  • Deduplicate GitHub action log fields: Event metadata (repository, owner, and pull request number) was being attached by both the event loop and the GitHub action runners, causing duplicate keys in structured log lines. The runners now only log action-specific fields (including the target label when removing a label).
  • Fix OAuth2 deprecation warning on request timeouts: Setting an HTTP client timeout on the legacy OAuth2 client caused Go to call a deprecated cancellation method whenever a GitHub request timed out. Switching to the native token authentication helper in the GitHub client library stops the warning and removes the unused OAuth2 dependency.

EvLoop.scheduleAction already appends event.LogFields (git.repository, github.repository_owner, github.pull_request) to action.LogFields(). Include github.label in RemoveLabelRunner.LogFields() instead.
Using oauth2.NewClient with http.Client.Timeout triggers the deprecated oauth2.Transport.CancelRequest method on request timeouts. Use github.Client.WithAuthToken instead and remove the direct golang.org/x/oauth2 dependency.
@FranciscoKurpiel FranciscoKurpiel changed the title githubclt, action/github: remove duplicate log fields and deprecated oauth2 transport Clean up duplicate action log fields and deprecated OAuth2 transport Oct 27, 2026
@FranciscoKurpiel
FranciscoKurpiel merged commit 0d91536 into main Oct 27, 2026
6 checks passed
@FranciscoKurpiel
FranciscoKurpiel deleted the fix/minor-log-and-oauth2-cleanups branch October 27, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant