Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for backing up repositories owned by the current user #116

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

notheotherben
Copy link
Member

@notheotherben notheotherben commented Dec 8, 2024

This PR adds support for backing up repos owned by the current user, without needing to specify the current user's username. This solves the issue of being unable to backup private personal repos (given the way the GitHub API works when requesting /users/${username}/repos regardless of whether your username matches ${username}.

In addition to this, I've included support for a new properties.query field which can be used to pass query parameters to the GitHub API, allowing you to select which repos get included in a query (for example, you can filter repos for the current user to only include owner, or include any combination of the default owner,collaborator,organization_member.

Oh, and I should mention that we now handle cases where you don't specify an OTEL_EXPORTER_OTLP_ENDPOINT without reporting an error - and correctly fall back to logging to the terminal.

Copy link

codecov bot commented Dec 8, 2024

Codecov Report

Attention: Patch coverage is 76.19048% with 10 lines in your changes missing coverage. Please review.

Project coverage is 70.62%. Comparing base (928aa44) to head (ee617ea).

Files with missing lines Patch % Lines
src/sources/github_repo.rs 81.48% 5 Missing ⚠️
src/main.rs 0.00% 3 Missing ⚠️
src/telemetry/mod.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
- Coverage   70.65%   70.62%   -0.04%     
==========================================
  Files          24       24              
  Lines        2164     2175      +11     
==========================================
+ Hits         1529     1536       +7     
- Misses        635      639       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot added docs feature New feature or request labels Dec 8, 2024
@notheotherben notheotherben merged commit 1d76dd8 into main Dec 8, 2024
16 of 19 checks passed
@notheotherben notheotherben deleted the feat/current-user branch December 8, 2024 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant