Skip to content

chore(repo): harden .gitignore and add .dockerignore for lean builds#7

Merged
Dumidu1212 merged 1 commit intomainfrom
chore/gitignore-hardening
Oct 12, 2025
Merged

chore(repo): harden .gitignore and add .dockerignore for lean builds#7
Dumidu1212 merged 1 commit intomainfrom
chore/gitignore-hardening

Conversation

@Dumidu1212
Copy link
Owner

@Dumidu1212 Dumidu1212 commented Oct 12, 2025

Summary by CodeRabbit

  • Chores
    • Introduced a .dockerignore to exclude common folders/files from Docker build context, improving build efficiency.
    • Expanded and reorganized .gitignore into clear sections covering tooling logs, package locks, build and test outputs, environment files, editor/OS artifacts, Docker files, and API spec caches.
    • Reduces repository noise, prevents accidental commits of sensitive or generated files, and streamlines local development and CI builds.

@coderabbitai
Copy link

coderabbitai bot commented Oct 12, 2025

Walkthrough

Introduces a new .dockerignore to exclude common files from Docker build context. Reorganizes and expands .gitignore with categorized sections covering tooling, build artifacts, environments, logs, editors/OS, Docker, testing, and registry caches. No changes to exported or public code entities.

Changes

Cohort / File(s) Summary
Docker build context ignores
./.dockerignore
New file added to exclude VCS, dependencies, build outputs, logs, editor configs, Docker files, and env files from Docker build context.
Git ignore rules reorganization
./.gitignore
Restructured into categorized sections; expanded ignore patterns for node/pnpm/yarn artifacts, builds, TypeScript/testing outputs, env/secrets, logs, editors/OS, tooling caches, local dev/runtime, Docker, Swagger/OpenAPI, and registry caches. Existing ignores retained under new sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I tidied the burrow with neat little hops,
New fences for Docker, less clutter in props.
Git’s garden now labeled, weeds kept at bay,
Logs and secrets hidden away.
Thump-thump! says the rabbit—clean trails today. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely summarizes the primary changes by indicating that the .gitignore has been strengthened and a new .dockerignore file has been added to optimize build context, directly reflecting the modifications made in the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/gitignore-hardening

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 51f0010 and 11a430b.

📒 Files selected for processing (2)
  • .dockerignore (1 hunks)
  • .gitignore (1 hunks)

Comment on lines +7 to +8
package-lock.json
# (Keep package-lock.json if you want reproducible installs. Remove this line then.)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Do not ignore package-lock.json.

Ignoring the npm lock file removes deterministic installs and blocks us from committing security patches captured in the lock. Please drop this pattern (or explicitly justify the policy change) so we keep lockfiles under version control.

🤖 Prompt for AI Agents
In .gitignore around lines 7-8, the file currently ignores package-lock.json
which prevents committing the npm lockfile; remove the package-lock.json entry
from .gitignore (or the specific line/pattern) so the lockfile is tracked, then
commit the updated .gitignore and the existing package-lock.json to repository
to restore deterministic installs and allow lockfile security updates to be
recorded.

@Dumidu1212 Dumidu1212 merged commit 884bade into main Oct 12, 2025
3 checks passed
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.

1 participant