openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
124 stars 81 forks source link

github.provider.token, cache github.ListRepos call #1642

Closed chmouel closed 3 months ago

chmouel commented 3 months ago

we were calling:

repoList, err := github.ListRepos(ctx, gh)

each time on each isntallationData when this call can only be done once and be cached.

using a struct and refactor the code to use it.

Changes

Submitter Checklist

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 82.35294% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 64.11%. Comparing base (c703cd8) to head (b4b06cf).

Files Patch % Lines
pkg/provider/github/app/token.go 80.00% 4 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1642 +/- ## ========================================== + Coverage 64.09% 64.11% +0.02% ========================================== Files 140 140 Lines 10897 10912 +15 ========================================== + Hits 6984 6996 +12 - Misses 3380 3382 +2 - Partials 533 534 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.