Skip to content

New Results API #49

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

Merged
merged 10 commits into from
Dec 23, 2020
Merged

New Results API #49

merged 10 commits into from
Dec 23, 2020

Conversation

sgb-io
Copy link
Owner

@sgb-io sgb-io commented Dec 23, 2020

This updates the top level API of codehawk-cli and exposes new data, mainly average/worst scores for a project. Support for 2 new badges has also been added.

  • analyzeProject has been updated to return a new Result interface.
    • results has been moved to fullResultsTree, users can still interact with the full tree as before
    • resultsList was added, it contains a flat list of all analyzed files (FullyAnalyzedFile[]), which is often more practical to work with rather than manually traversing the whole tree
    • summary was added, it contains a new ResultsSummary which gives us the average, median and worst score from all analyzed files
  • generateBadge added to public API. This is also called during normal runs.
  • Renamed blacklist to blocklist
  • Moved to using import type syntax for type imports
  • Updated sample test outputs
  • Bumped jest
  • Bumped typescript

Resolves #44

@sgb-io sgb-io mentioned this pull request Dec 23, 2020
@sgb-io sgb-io merged commit abba797 into master Dec 23, 2020
@sgb-io sgb-io deleted the feat/results-api branch December 23, 2020 16:13
@sgb-io sgb-io mentioned this pull request Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Define and expose a results API interface for programmatic usage
1 participant