OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

[OE] Adds dev doc script to precommit hook

Open ashwin-pc opened this issue 1 year ago • 1 comments
trafficstars

Description

Adds dev doc generation script to the precommit hook. It also validates that it is staged and fails if there is a diff and the diff isnt staged.

Issues Resolved

Screenshot

Testing the changes

  • Add a new Markdown file to the docs folder
  • Try to commit that chnage without running yarn docs:generateDevDocs
  • The commit should fail with the updated sidebar in the unstaged section
  • Staging it should resolve the issue and allow you to commit the change

Changelog

  • chore: Adds a git pre commit hook to ensure that developer docs are always updated

Check List

  • [x] All tests pass
    • [ ] yarn test:jest
    • [ ] yarn test:jest_integration
  • [ ] New functionality includes testing.
  • [ ] New functionality has been documented.
  • [x] Update CHANGELOG.md
  • [x] Commits are signed per the DCO using --signoff

ashwin-pc avatar Apr 22 '24 09:04 ashwin-pc

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.70%. Comparing base (9ac5203) to head (6a77fc1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6585   +/-   ##
=======================================
  Coverage   67.70%   67.70%           
=======================================
  Files        3417     3417           
  Lines       66922    66922           
  Branches    10888    10888           
=======================================
+ Hits        45310    45311    +1     
  Misses      18966    18966           
+ Partials     2646     2645    -1     
Flag Coverage Δ
Linux_1 33.18% <ø> (ø)
Linux_2 55.59% <ø> (ø)
Linux_3 45.24% <ø> (-0.02%) :arrow_down:
Linux_4 34.84% <ø> (ø)
Windows_1 33.20% <ø> (ø)
Windows_2 55.56% <ø> (ø)
Windows_3 45.26% <ø> (ø)
Windows_4 34.84% <ø> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 23 '24 16:04 codecov[bot]

@ashwin-pc should this PR be backported to 2.x?

BionIT avatar Jun 05 '24 05:06 BionIT