Skip to content

Move files out of root directory to highlight README (#571)#933

Open
SurbhiAgarwal1 wants to merge 1 commit into
OWASP:mainfrom
SurbhiAgarwal1:issue-571-move-files-out-of-root
Open

Move files out of root directory to highlight README (#571)#933
SurbhiAgarwal1 wants to merge 1 commit into
OWASP:mainfrom
SurbhiAgarwal1:issue-571-move-files-out-of-root

Conversation

@SurbhiAgarwal1

Copy link
Copy Markdown

This PR addresses issue #571 by decluttering the repository's root directory, ensuring the README.md and primary entry points are significantly more prominent. Configuration files have been organized into their respective logical subdirectories, specifically separating frontend tooling from backend dependencies.

What was changed:

  1. Frontend Files Relocated: Consolidated all React/Node configuration files into application/frontend/.
    • Moved: package.json, yarn.lock, .babelrc, .eslintrc.js, .prettierrc, .prettierignore, tsconfig.json, webpack.config.js, webpack.prod.js, cypress.json, enzyme-setup.js
  2. Backend Files Relocated: Consolidated Python configuration into application/.
    • Moved: requirements.txt, pytest.ini
  3. Documentation Files Relocated:
    • Moved AGENTS.md to docs/AGENTS.md
    • Moved CODE_OF_CONDUCT.md to .github/CODE_OF_CONDUCT.md
  4. Orchestration Updates: Refactored the build scripts and pipelines to account for the new file paths:
    • Makefile: Updated commands to execute yarn scripts from within the application/frontend directory, and updated the pip install path for requirements.txt.
    • Dockerfile & Dockerfile-dev: Updated the COPY and RUN directives to ensure dependencies are installed correctly from the new subdirectory paths.
    • GitHub Actions (.github/workflows/linter.yml): Updated the CI linting job to cd application/frontend before installing dependencies and checking formatting.

(Note: Essential standard files such as README.md, LICENSE, Makefile, .gitignore, and .dockerignore were explicitly left in the root directory as they are required by platforms like GitHub and Docker.)

Testing Performed:

  • Ran the Python backend test suite (make test equivalent) to verify that internal logic and paths remain intact.
  • Ensured all orchestration paths in Dockerfile and Makefile correctly reflect the newly nested structures.

Closes #571

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: f8027f68-bd17-41cc-a1c2-7e54995658f6

📥 Commits

Reviewing files that changed from the base of the PR and between e853cd3 and 6fc8c0c.

⛔ Files ignored due to path filters (1)
  • application/frontend/yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (18)
  • .github/CODE_OF_CONDUCT.md
  • .github/workflows/linter.yml
  • Dockerfile
  • Dockerfile-dev
  • Makefile
  • application/frontend/.babelrc
  • application/frontend/.eslintrc.js
  • application/frontend/.prettierignore
  • application/frontend/.prettierrc
  • application/frontend/cypress.json
  • application/frontend/enzyme-setup.js
  • application/frontend/package.json
  • application/frontend/tsconfig.json
  • application/frontend/webpack.config.js
  • application/frontend/webpack.prod.js
  • application/pytest.ini
  • application/requirements.txt
  • docs/AGENTS.md

Summary by CodeRabbit

  • Chores
    • Reorganized build infrastructure to use consistent directory paths across CI/CD workflows, Docker builds (production and development), and local development commands.
    • Updated frontend dependency installation and build commands to execute from appropriately structured directories.
    • Restructured backend dependency references in Docker and development tools for improved organization.

Walkthrough

All build tooling is updated to reflect that the frontend project lives under application/frontend/ and Python requirements under application/requirements.txt. Changes span Dockerfile, Dockerfile-dev, Makefile targets (e2e, lint, frontend, install-deps-python), and the CI lint workflow.

Changes

Path relocation across build tooling

Layer / File(s) Summary
Docker image frontend and requirements path updates
Dockerfile, Dockerfile-dev
Dockerfile now runs yarn install and yarn build from application/frontend in the Node build stage and references application/requirements.txt in the Python run stage. Dockerfile-dev copies package.json/yarn.lock into application/frontend/ and runs yarn install from that directory.
Makefile targets and CI workflow path updates
Makefile, .github/workflows/linter.yml
Makefile e2e, lint, and frontend targets wrap yarn commands in cd application/frontend subshells; install-deps-python references application/requirements.txt. CI lint workflow adds cd application/frontend before yarn install and updates the Prettier check glob to be relative to that directory.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Move files out of root directory to highlight README' directly matches the main objective of the PR, which is to declutter the root directory and make the README more prominent.
Description check ✅ Passed The description thoroughly details the files relocated, the changes made to build scripts, and testing performed, all of which align with the PR's objective to reorganize the repository structure.
Linked Issues check ✅ Passed The PR objectives and description comprehensively address issue #571 by moving configuration files from root to subdirectories, updating build system files (Makefile, Dockerfiles, GitHub Actions) to reflect new paths, and preserving essential standard files.
Out of Scope Changes check ✅ Passed All changes in the raw_summary are directly related to updating build configuration files to accommodate the relocated frontend and backend files, which is within scope of reorganizing the repository structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

REPO="OWASP/OpenCRE"
PR=933

echo "=== PR Status ==="
gh pr view $PR --repo $REPO --json state,mergeable,mergeStateStatus,reviewDecision,isDraft,title,baseRefName,headRefName

echo ""
echo "=== CI Checks ==="
gh pr checks $PR --repo $REPO 2>&1 || true

echo ""
echo "=== Reviews ==="
gh pr view $PR --repo $REPO --json reviews

echo ""
echo "=== Review Comments (unresolved) ==="
gh api "repos/$REPO/pulls/$PR/comments" --jq '[.[] | {id:.id, user:.user.login, body:.body, path:.path, line:.line}]' 2>&1 | head -100

echo ""
echo "=== Issue Comments ==="
gh api "repos/$REPO/issues/$PR/comments" --jq '[.[] | {id:.id, user:.user.login, body:.body[0:200]}]' 2>&1 | head -100

Length of output: 1551



@SurbhiAgarwal1 The PR is not yet ready to merge — here's the current status:

Check Status
Merge conflicts ✅ None
CodeRabbit review ✅ Passed
Unresolved review comments ✅ None
Human approval Required — 0 reviews submitted

The only blocker is that the PR has REVIEW_REQUIRED — no maintainer has approved it yet (reviewDecision: REVIEW_REQUIRED, reviews: []). Once a repository maintainer reviews and approves the changes, it should be mergeable. You may want to ping the relevant maintainers or assignees to request a review.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

Let me look up the repository maintainers so I can tag the right people.

#!/bin/bash
set -euo pipefail

REPO="OWASP/OpenCRE"

echo "=== Repository collaborators/contributors ==="
gh api "repos/$REPO/contributors" --jq '[.[] | {login:.login, contributions:.contributions}] | sort_by(-.contributions) | .[0:10]'

echo ""
echo "=== CODEOWNERS or maintainers file ==="
gh api "repos/$REPO/contents/CODEOWNERS" --jq '.content' 2>/dev/null | base64 -d 2>/dev/null || echo "No CODEOWNERS file found"

echo ""
echo "=== Recent PR reviewers ==="
gh api "repos/$REPO/pulls?state=closed&per_page=10" --jq '[.[] | {number:.number, reviewers:[.requested_reviewers[].login]}]'

echo ""
echo "=== Repo topics/details ==="
gh repo view $REPO --json owner,assignees

echo ""
echo "=== Issue `#571` details (linked issue) ==="
gh api "repos/$REPO/issues/571" --jq '{title:.title, assignees:[.assignees[].login], author:.user.login}'
</thinking>


```shell
#!/bin/bash
set -euo pipefail

REPO="OWASP/OpenCRE"
PR=933

echo "=== PR Requested Reviewers ==="
gh pr view $PR --repo $REPO --json requestedReviewers

echo ""
echo "=== Top contributors ==="
gh api "repos/$REPO/contributors" --jq '[.[] | {login:.login, contributions:.contributions}] | sort_by(-.contributions) | .[0:8]'

echo ""
echo "=== Repo admins/org members ==="
gh api "repos/$REPO/collaborators" --jq '[.[].login]' 2>/dev/null || echo "Cannot list collaborators (private info)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move as many files and folders as possible out of the root, for the readme to be more prominent

1 participant