Skip to content

feat: scratch.mjs is committed to the repository root β€” development scratch files should never be in version controlΒ #458

Description

@divyanshim27

πŸ› Problem Statement

The file scratch.mjs is committed at the repository root. Similarly, test-next-cookies.mjs and test.css are committed as well. These are clearly temporary development/debugging scripts that were never meant to be part of the codebase.

Why this is a problem:

  1. Confusing to contributors β€” new GSSoC contributors opening the repo see scratch.mjs at the root alongside next.config.ts and assume it is intentional project code. It isn't, and it contains no documentation.
  2. Noise in git log β€” every change to scratch files creates meaningless commit history entries.
  3. Potential secret exposure β€” scratch files often contain hardcoded test values, API keys, or database URLs that developers used during debugging. These should never be in git history.
  4. test-next-cookies.mjs suggests it was used to debug NextAuth cookie behavior β€” it may contain session tokens or configuration that should not be public.

Fix Required

# Remove from git tracking
git rm --cached scratch.mjs test-next-cookies.mjs test.css

# Add to .gitignore
cat >> .gitignore << 'EOF'

# Development scratch files
scratch.*
scratch/
test-*.mjs
test-*.js
*.scratch.*
EOF

git commit -m "chore: remove development scratch files from version control"

Also review whether these files contain any hardcoded API keys, database URLs, or session tokens before removing β€” if they do, those credentials should be rotated immediately.

Files to Remove from Tracking

File Reason
scratch.mjs Development scratch script, not part of the project
test-next-cookies.mjs NextAuth debugging script
test.css Temporary CSS test file

πŸ“Š Impact

Small fix, large signal. A repository's root directory is the first thing every contributor sees. Scratch files at the root signal that the repo needs housekeeping and can discourage serious contributors. Removing them and updating .gitignore sets a clean standard for future contributions.

Suggested labels: chore, good first issue, gssoc:level1

I would like to work on this. Could you please assign it to me?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions