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

New nicer version of the catchup script #253

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

BlueCutOfficial
Copy link
Member

@BlueCutOfficial BlueCutOfficial commented Aug 10, 2024

Relates to #220 (doesn't close it because I consider replacing the argument parser)

This PR implements a new, nicer version of the catchup script:

  • The script is split into several files for better readability and maintenance.
  • Multiline messages are returned by dedicated functions to avoid big text blocks in the middle of the logic, making the process easier to follow.
  • Additionally, requests to the GitHub API are managed by an instance of a GithubAdapter class that can be constructed with all the parameters required for the different requests.
  • The possible execution paths have been simplified: the script doesn't make it to the API requests if there's an issue with file writing and never updates ref-upstream nor switches back to master if there's anything manual to do.
  • The library chalk is used to add colors and styles to the different messages, which greatly improves the readability of the output.
  • shelljs was used in the 1st version of the script, it should have been uninstalled sooner.

Note it has been implemented and tested in a dedicated repository.

@BlueCutOfficial BlueCutOfficial added the enhancement New feature or request label Aug 10, 2024
@BlueCutOfficial
Copy link
Member Author

I want to run the script soon enough, so I'll merge this since it has been open for a while and it's a bit hard to review. There are still improvements to make afterward.

@BlueCutOfficial BlueCutOfficial merged commit 0db5f44 into master Oct 3, 2024
2 checks passed
@BlueCutOfficial BlueCutOfficial deleted the improve-catchup-script branch October 3, 2024 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant