Skip to content

vznh/ool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ool

Doubly-supported by NeXTJS and Rust. Should just be testing GitHub REST API using various methods.

Front

Find in app/ is a NeXTJS app governed by Biome for formatting and linting. Run this pipeline every time you make a change to the app. Should be built in TypeScript, is a multi-page app using Pages Router. Naming conventions are camelCase, and packages should be pushed individually BEFORE large changes (feat.,), and with if small changes (hotfixes).

Back

Find in back/ is a Rust crate that is governed by fmt. Run this formatting every time that you are about to commit, using cargo fmt. Naming conventions is snake_case, and crate chores should be always be pushed first-order.

Testing

You'll find that tests are abundant within both areas. The front contains basic (unit tests), if is calls to check if web server returns as-should calls. The back contains both basic & integration tests to keep us on our toes - as we should be constantly updating data from GitHub's repository to keep getting the latest data.

Unit test conventions should be same naming conventions, but with test_* and *_{type} at the end of the test. test_get_recent_commits_success where test_ is the prefix, *_{type} would be success, as that's what we're looking for. As-is, a simple basic test.

Integration tests are a bit more complex, where we continue with the test_ prefix, but instead of *_type, we'll be looking for *_{expected_behavior}. test_github_full_repo_refresher_is_not_empty where test_ is the prefix, and _is_not_empty is the expected behavior that the test should be looking for.

Committing

Run npm run format in the root directory if you've made changes to both directories. Else, bun x biome format --write or cargo fmt will work just perfectly. You'll additionally find that when you commit, there will be a slight delay. There is a Husky workflow in-place that formats, lints, and checks your file for any errors before committing in order to prevent a breaking change.

About

Messing around with GitHub REST API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors