forked from opensearch-project/OpenSearch-Dashboards
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OE] Adds dev doc script to precommit hook (opensearch-project#6585)
* Adds doc generation to pre commit hook Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Add check hook to pre commit Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> * Changeset file for PR opensearch-project#6585 created/updated * Update error message Signed-off-by: Ashwin P Chandran <ashwinpc1993@gmail.com> * Improve error message Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: Ashwin P Chandran <ashwinpc1993@gmail.com> * fixes lint issue Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> --------- Signed-off-by: Ashwin P Chandran <ashwinpc@amazon.com> Signed-off-by: Ashwin P Chandran <ashwinpc1993@gmail.com> Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> Co-authored-by: Miki <amoo_miki@yahoo.com> Signed-off-by: yujin-emma <yujin.emma.work@gmail.com>
- Loading branch information
1 parent
57ca1ab
commit 9560ca0
Showing
6 changed files
with
66 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
chore: | ||
- Adds a git pre commit hook to ensure that developer docs are always updated ([#6585](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/6585)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
const SIDEBAR_PATH = 'docs/_sidebar.md'; | ||
|
||
export async function checkDevDocs(log, files) { | ||
files.map((file) => { | ||
const path = file.getRelativePath(); | ||
|
||
if (path === SIDEBAR_PATH) { | ||
throw Error( | ||
`The ${SIDEBAR_PATH} file of the developer docs has been modified but is not ready to be committed. This can be done by performing "git add ${SIDEBAR_PATH}" and committing the changes.` | ||
); | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters