Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…awa-admin into action-item-category
  • Loading branch information
meetulr committed Feb 11, 2024
2 parents f9dfd97 + 82b22ab commit e3073a7
Show file tree
Hide file tree
Showing 222 changed files with 2,045 additions and 17,890 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/authorized-changes-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
- '.github/**'
- 'env.example'
- '.husky/**'
- '.scripts/**'
- 'scripts/**'
- 'package.json'
- 'tsconfig.json'
- '.gitignore'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Script to make Markdown files MPX compatible.
Script to make Markdown files MDX compatible.
This script scans Markdown files and escapes special characters (<, >, {, })
to make them compatible with the MPX standard used in Docusaurus v3.
to make them compatible with the MDX standard used in Docusaurus v3.
This script complies with:
1) Pylint
Expand All @@ -17,9 +17,9 @@
import argparse
import re

def escape_mpx_characters(text):
def escape_mdx_characters(text):
"""
Escape special characters in a text string for MPX compatibility.
Escape special characters in a text string for MDX compatibility.
Avoids escaping already escaped characters.
Args:
Expand All @@ -45,7 +45,7 @@ def escape_mpx_characters(text):

def process_file(filepath):
"""
Process a single Markdown file for MPX compatibility.
Process a single Markdown file for MDX compatibility.
Args:
filepath: The path to the Markdown file to process.
Expand All @@ -56,8 +56,8 @@ def process_file(filepath):
with open(filepath, 'r', encoding='utf-8') as file:
content = file.read()

# Escape MPX characters
new_content = escape_mpx_characters(content)
# Escape MDX characters
new_content = escape_mdx_characters(content)

# Write the processed content back to the file only if there is a change
if new_content != content:
Expand All @@ -69,15 +69,15 @@ def main():
Main function to process all Markdown files in a given directory.
Scans for all Markdown files in the specified directory and processes each
one for MPX compatibility.
one for MDX compatibility.
Args:
None
Returns:
None
"""
parser = argparse.ArgumentParser(description="Make Markdown files MPX compatible.")
parser = argparse.ArgumentParser(description="Make Markdown files MDX compatible.")
parser.add_argument(
"--directory",
type=str,
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request-target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
### Reviewers
Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:
1. comments in this PR or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,12 @@ jobs:

- name: Run linting check
if: steps.changed-files.outputs.only_changed != 'true'
run: npm run lint:check
run: npm run lint:check

- name: Check for localStorage Usage
run: |
chmod +x scripts/githooks/check-localstorage-usage.js
node scripts/githooks/check-localstorage-usage.js --scan-entire-repo
- name: Compare translation files
run: |
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

Generate-Documentation:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/automated-docs'
# if: github.ref == 'refs/heads/automated-docs'
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -102,8 +102,8 @@ jobs:
npm install --save-dev @types/node
npx typedoc --entryPoints src/components src/screens --out talawa-admin-docs --plugin typedoc-plugin-markdown --theme markdown --entryPointStrategy expand --exclude "**/*.test.ts" --exclude "**/*.css"
- name: Make Markdown Files MPX Compatible
run: python ./.github/workflows/md_mpx_format_adjuster.py --directory talawa-admin-docs
- name: Make Markdown Files MDX Compatible
run: python ./.github/workflows/md_mdx_format_adjuster.py --directory talawa-admin-docs


- name: Checking doc updated
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- uses: actions/checkout@v3
- uses: dmnemec/copy_file_to_another_repo_action@v1.1.1
env:
API_TOKEN_GITHUB: ${{ secrets.TALAWA_DOCS_SYNC_NEW }}
API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}}
with:
source_file: 'talawa-admin-docs/'
destination_repo: 'PalisadoesFoundation/talawa-docs'
Expand All @@ -158,5 +158,3 @@ jobs:
user_email: '${{env.email}}'
user_name: '${{github.actor}}'
commit_message: 'Talawa Admin docs updated'


3 changes: 2 additions & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"**/*.{ts,tsx,yml}": "eslint --fix",
"**/*.{ts,tsx,json,scss,css,yml}": "prettier --write"
"**/*.{ts,tsx,json,scss,css,yml}": "prettier --write",
"**/*.{ts,tsx}": "node scripts/githooks/check-localstorage-usage.js"
}
2 changes: 1 addition & 1 deletion CODE_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ code style should not be changed and must be followed.

- GraphQL

- Jest & Enzyme for testing
- Jest & React Testing Library for testing

## Component Structure

Expand Down
Loading

0 comments on commit e3073a7

Please sign in to comment.