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

Massive feature lift #3

Merged
merged 12 commits into from
May 16, 2023
Merged

Massive feature lift #3

merged 12 commits into from
May 16, 2023

Conversation

azemetre
Copy link
Collaborator

New features:

  • Adding a Spinner TUI for better DX
  • Renamed commands to be more fisherman themed, still WIP
  • GetRepos() enhancements:
    • Retry ability if initial GET call fails or errors
    • Ability to ignore forked repos by default
    • Adding sleep timers based on X-Ratelimit-Remaining header response
    • Ability to create a repos.json file from fetched repos
    • Takes a HttpClient as a param to assist in easier test construction
  • CloneReposFromJson() enhancements:
    • Takes a CommandExecutor to assist in testing
    • If repo already exists, pull in latest head instead.
    • Increment counter uses atomics
  • RepoByLanguage() allows ability to further filter fetched repos more. Should allow composability when working with Cobra commands
  • Initial test cases

azemetre added 12 commits May 15, 2023 09:37
Resolves "success friend" from executing regardless of failures.
Rate Limiting: checks `X-Ratelimit-Remaining` in the header response and
determines how long to sleep based on reset time.

Repo Checks: if repo is already cloned, pull latest head instead of
cloning.

Retry Logic: Retries 3 times to GET the repo response from GitHub.

Spinner: Adding a new spinner for cleaning CLT usage, saves on amount of
lines outputted previously.

feat: filter by language function

Adding ability to filter []RepoModel by language
chore: cleaning up order of variables and params
When implementing the CommandExecutor struct, a option to run commands
in current directory was neglected. After adding it and correctly
calling it in the if/else for git clones resolved the issue.

Using atomics to increment the counter to help resolve issue with
spinner not appearing when executing `CloneReposFromJson()`
@azemetre azemetre added bug Something isn't working enhancement New feature or request tests anything involving testing, suites of tests, types of tests, structuring tests labels May 16, 2023
@azemetre azemetre self-assigned this May 16, 2023
@azemetre azemetre merged commit b140430 into main May 16, 2023
@azemetre azemetre deleted the massive-feature-lift branch May 16, 2023 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request tests anything involving testing, suites of tests, types of tests, structuring tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant