github-exporter icon indicating copy to clipboard operation
github-exporter copied to clipboard

feat: Added GitHub app authentication

Open galbirk opened this issue 2 years ago • 0 comments

In this PR I added the feature of authenticating to GitHub API with github app and allowing to fetch metrics about it.

Tests:

$ make test                                                                                                                     
?       github.com/infinityworks/github-exporter        [no test files]
?       github.com/infinityworks/github-exporter/config [no test files]
?       github.com/infinityworks/github-exporter/exporter       [no test files]
?       github.com/infinityworks/github-exporter/http   [no test files]
=== RUN   TestHomepage
Created sequence diagram (2641264843_2166136261.html): /Users/galbirkman/projects/github-exporter/test/.sequence/2641264843_2166136261.html
--- PASS: TestHomepage (0.01s)
=== RUN   TestGithubExporter
time="2023-05-21T16:30:35+03:00" level=info msg="Fetching https://api.github.com/repos/myOrg/myRepo?per_page=100 \n"
time="2023-05-21T16:30:35+03:00" level=info msg="Fetching https://api.github.com/repos/myOrg/myRepo/releases \n"
time="2023-05-21T16:30:35+03:00" level=info msg="Fetching https://api.github.com/repos/myOrg/myRepo/pulls \n"
time="2023-05-21T16:30:35+03:00" level=info msg="API data fetched for repository: https://api.github.com/repos/myOrg/myRepo?per_page=100"
time="2023-05-21T16:30:35+03:00" level=info msg="All Metrics successfully collected"
Created sequence diagram (31181356_2166136261.html): /Users/galbirkman/projects/github-exporter/test/.sequence/31181356_2166136261.html
--- PASS: TestGithubExporter (0.07s)
PASS
ok      github.com/infinityworks/github-exporter/test   1.388s

Closes #95

galbirk avatar May 21 '23 13:05 galbirk