-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
81c7493
commit e2a8b30
Showing
69 changed files
with
20,636 additions
and
1 deletion.
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
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,57 @@ | ||
--- | ||
# yamllint disable rule:truthy rule:line-length | ||
name: Sync Folders | ||
|
||
on: | ||
push: | ||
branches: | ||
- stable | ||
paths: | ||
- 'docs/docs/**' | ||
- 'docs/sidebars.ts' | ||
pull_request: | ||
branches: | ||
- stable | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: source-repo | ||
|
||
- name: Checkout target repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: opsmill/infrahub-docs | ||
token: ${{ secrets.PAT_TOKEN }} | ||
path: target-repo | ||
|
||
- name: Sync folders | ||
run: | | ||
rm -rf target-repo/docs/docs-python-sdk/* | ||
rm -f target-repo/python_sdk/examples/* | ||
rm -f target-repo/docs/sidebars-python-sdk.ts | ||
cp -r source-repo/docs/docs/python-sdk/* target-repo/docs/docs-python-sdk | ||
cp -r source-repo/examples/* target-repo/python_sdk/examples/ | ||
cp source-repo/docs/sidebars.ts target-repo/docs/sidebars-python-sdk.ts | ||
sed -i 's/python-sdk\///g' target-repo/docs/sidebars-python-sdk.ts | ||
for entry in source-repo/docs/docs/*; do | ||
name=$(basename "$entry") | ||
if [ "$name" != "python-sdk" ]; then | ||
if [ -d "$entry" ]; then | ||
cp -r "$entry"/* "target-repo/docs/docs/$name/" | ||
elif [ -f "$entry" ]; then | ||
cp "$entry" "target-repo/docs/docs/" | ||
fi | ||
fi | ||
done | ||
cd target-repo | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git add . | ||
if ! (git diff --quiet && git diff --staged --quiet); then git commit -m "Sync doc Python SDK from infrahub repo" && git push; fi |
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,15 @@ | ||
StylesPath = .vale/styles | ||
|
||
MinAlertLevel = warning | ||
|
||
[formats] | ||
mdx = md | ||
|
||
[docs/**/*.md] | ||
BasedOnStyles = Infrahub | ||
;(import.*?\n) to ignore import statement in .mdx | ||
;(```.*?```\n) to ignore code block in .mdx | ||
BlockIgnores = (?s) *((import.*?\n)|(```.*?```\n)) | ||
|
||
[*] | ||
BasedOnStyles = Infrahub |
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,14 @@ | ||
--- | ||
extends: substitution | ||
message: Use '%s' instead of '%s' | ||
level: error | ||
ignorecase: false | ||
action: | ||
name: replace | ||
swap: | ||
(?i:[^/]Github): GitHub | ||
(?i:gitpod): GitPod | ||
(?i:[^/]Graphql): GraphQL | ||
infrahub(?:\s|$): Infrahub | ||
(?i:Openconfig): OpenConfig | ||
opsmill(?:\s|$): OpsMill |
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,8 @@ | ||
--- | ||
extends: substitution | ||
message: "Use a space after a colon, but not before" | ||
level: warning | ||
ignorecase: true | ||
nonword: true | ||
swap: | ||
'(?<=\s):(?=\s+)': ': ' |
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,12 @@ | ||
--- | ||
extends: substitution | ||
message: "Instead of %s, use ',i.e.,' or 'for example:'." | ||
level: warning | ||
ignorecase: true | ||
nonword: true | ||
action: | ||
name: replace | ||
swap: | ||
- e\.g\.: i.e. | ||
- e\. g\.: i.e. | ||
- i\. e\.: i.e. |
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,8 @@ | ||
--- | ||
extends: existence | ||
message: "Use a comma before the last 'and' or 'or' in a list of items." | ||
level: suggestion | ||
scope: sentence | ||
nonword: true | ||
tokens: | ||
- '(?:[^\s,]+,){1,} \w+ (?:and|or) \w+[.?!]' |
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,78 @@ | ||
--- | ||
extends: capitalization | ||
message: "'%s' should use sentence case" | ||
level: warning | ||
scope: | ||
- heading.h1 | ||
- heading.h2 | ||
- heading.h3 | ||
- heading.h4 | ||
- heading.h5 | ||
- heading.h6 | ||
match: $sentence | ||
exceptions: | ||
- Alpha | ||
- Ansible | ||
- API | ||
- Attributes | ||
- AWS S3 | ||
- Beta | ||
- BGP | ||
- CA certificates | ||
- CI | ||
- Codespaces | ||
- Computed Attribute | ||
- Computed Attributes | ||
- CoreArtifactTarget | ||
- CoreRepository | ||
- CoreGroup | ||
- Docker Compose | ||
- E2E | ||
- Generics | ||
- Git | ||
- GitHub | ||
- GitHub Codespaces | ||
- GitLab | ||
- GitPod | ||
- GraphQL | ||
- GraphQLQuery | ||
- include_in_menu & menu_placement | ||
- Helm | ||
- High Availability | ||
- Human Friendly Identifier | ||
- Infrahub | ||
- infrahubctl | ||
- IPHost | ||
- IP | ||
- IPAM | ||
- IPNetwork | ||
- IP Fabric | ||
- JavaScript | ||
- JetStream | ||
- Jinja | ||
- Jinja2 | ||
- JWT | ||
- Namespace | ||
- NATS | ||
- Node | ||
- OAuth2 | ||
- OIDC | ||
- Open ID Connect | ||
- OpsMill | ||
- Pydantic | ||
- Python | ||
- RabbitMQ | ||
- REST | ||
- RFile | ||
- SDK | ||
- Single sign-on | ||
- SSO | ||
- TLS | ||
- Tony Stark | ||
- TransformPython | ||
- Trusted Root Certificate Store | ||
- UI | ||
- Vale | ||
- VS Code | ||
- VS Code extensions | ||
- WebUI |
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,9 @@ | ||
--- | ||
extends: existence | ||
message: "Remove %s and avoid words that minimize the effort level required." | ||
level: warning | ||
ignorecase: true | ||
tokens: | ||
- easy | ||
- simple | ||
- simply |
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,9 @@ | ||
--- | ||
extends: spelling | ||
message: "Did you really mean '%s'?" | ||
level: error | ||
filters: | ||
- '[pP]y.*\b' | ||
- '\bimport_.*\b' # New filter to ignore variables starting with 'import_' | ||
- '\w+__value' # New filter to skip Infrahub filters in documentation (name__value) | ||
ignore: spelling-exceptions.txt |
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,10 @@ | ||
--- | ||
extends: substitution | ||
message: "Use '%s' instead of '%s'" | ||
level: error | ||
ignorecase: true | ||
action: | ||
name: replace | ||
swap: | ||
config\b(?!\.\w): configuration | ||
repo: repository |
Oops, something went wrong.