diff --git a/.github/workflows/lint-format-checks.yml b/.github/workflows/lint-format-checks.yml index 65b9615..a1db9aa 100644 --- a/.github/workflows/lint-format-checks.yml +++ b/.github/workflows/lint-format-checks.yml @@ -31,9 +31,22 @@ jobs: run: npm run lint - name: Format with Prettier - run: npm run format:check + run: npm run format continue-on-error: true + - name: Check for modified files + id: git-check + run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) + + - name: Push changes + if: steps.git-check.outputs.modified == 'true' + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git add . + git commit -am "Automated Frontend Formatting Fixes" + # git push + lint-format-backend: name: Lint and Format Backend runs-on: ubuntu-latest @@ -58,8 +71,22 @@ jobs: - name: Lint with Flake8 run: | find . -name "*.py" -print0 | xargs -0 flake8 --max-line-length=120 --ignore=E402,F841,F401,E302,E305,E266,E203,W503 + continue-on-error: true - name: Format with Black run: | - find . -name "*.py" -print0 | xargs -0 black --check --experimental-string-processing --line-length=120 + find . -name "*.py" -print0 | xargs -0 black --experimental-string-processing --line-length=120 continue-on-error: true + + - name: Check for modified files + id: git-check + run: echo ::set-output name=modified::$(if git diff-index --quiet HEAD --; then echo "false"; else echo "true"; fi) + + - name: Push changes + if: steps.git-check.outputs.modified == 'true' + run: | + git config --global user.email "actions@github.com" + git config --global user.name "GitHub Actions" + git add . + git commit -am "Automated Backend Formatting Fixes" + # git push \ No newline at end of file diff --git a/backend/app/main.py b/backend/app/main.py index 58d4b6a..be331db 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -16,12 +16,8 @@ description=settings.description, version="1.0.0", # terms_of_service="URL to terms of service", - contact=[ - { - "name": "Kayvan Shah", - # "url": "Contact URL 1", - "email": "kayvan.shah@usc.edu", - }, + contact=[{"name": "Kayvan Shah",# "url": "Contact URL 1", + "email": "kayvan.shah@usc.edu", }, { "name": "Bhumi Godiwala", # "url": "Contact URL 2", diff --git a/frontend/src/App.js b/frontend/src/App.js index 1b90d06..ddb85b3 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -11,10 +11,7 @@ export default function App() { useAutosizeTextArea(textAreaRef.current, emailPrompt); - const handleChange = (evt) => { - const val = evt.target?.value; - setEmailPrompt(val); - }; + const handleChange = (evt) => {const val = evt.target?.value;setEmailPrompt(val);}; const getEmailResponse = async (text) => { var email_response = await fetch("http://127.0.0.1:8000/emails/", {