Skip to content

Commit 0a93da5

Browse files
Merge pull request #2 from kpj2006/patch-1
remove files which is not needed.
2 parents 56bbd75 + 362024f commit 0a93da5

42 files changed

Lines changed: 181 additions & 4699 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.coderabbit.yaml

Lines changed: 28 additions & 228 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ issue_enrichment:
3030
auto_apply_labels: true
3131
labeling_instructions:
3232
- label: bug
33-
instructions: Issues reporting bugs, errors, crashes, incorrect behavior, or unexpected results. This includes runtime errors, logic errors, broken functionality, regressions, and any deviation from expected or documented behavior.
33+
instructions: Issues reporting configuration bugs, broken policy settings, YAML syntax errors, or workflow execution failures.
3434
- label: enhancement
35-
instructions: Feature requests, improvements to existing functionality, performance optimizations, refactoring suggestions, UI/UX enhancements, and any suggestions to make the project better or add new capabilities.
35+
instructions: Requests to add new sub-org policies, refine branch protections, update rulesets, or enhance automated sync workflows.
3636
- label: documentation
37-
instructions: Documentation updates, additions, corrections, or clarifications needed. This includes missing docs, outdated information, unclear instructions, API documentation, code examples, README improvements, and any requests for better explanations or guides.
37+
instructions: Updates to README.md, policy manuals, setup guides, or best practices documentation.
3838
planning:
3939
enabled: true
4040
auto_planning:
@@ -58,7 +58,6 @@ reviews:
5858
# Only auto-review PRs targeting these branches
5959
base_branches:
6060
- main
61-
- develop
6261

6362
# Include a high-level summary at the start of each review
6463
high_level_summary: true
@@ -92,246 +91,47 @@ reviews:
9291

9392
# Exclude these paths from reviews (build artifacts and dependencies)
9493
path_filters:
95-
- "!**/node_modules/**" # npm dependencies
96-
- "!**/android/**" # Native Android build files
97-
- "!**/ios/**" # Native iOS build files
98-
- "!**/.expo/**" # Expo build cache
99-
- "!**/.expo-shared/**" # Expo shared config
100-
- "!**/dist/**" # Build output
94+
- "!**/node_modules/**"
95+
- "!**/dist/**"
10196

102-
# Use the following tools when reviewing
10397
tools:
104-
shellcheck:
105-
enabled: true
106-
ruff:
98+
yamllint:
10799
enabled: true
108100
markdownlint:
109101
enabled: true
110-
github-checks:
111-
enabled: true
112-
timeout_ms: 90000
113-
languagetool:
114-
enabled: true
115-
enabled_only: false
116-
level: default
117-
biome:
118-
enabled: true
119-
hadolint:
120-
enabled: true
121-
swiftlint:
122-
enabled: true
123-
phpstan:
124-
enabled: true
125-
level: default
126-
golangci-lint:
127-
enabled: true
128-
yamllint:
129-
enabled: true
130102
gitleaks:
131103
enabled: true
132-
checkov:
104+
shellcheck:
133105
enabled: true
134-
detekt:
106+
github-checks:
135107
enabled: true
108+
timeout_ms: 90000
136109
eslint:
137110
enabled: true
138111

139-
# Apply the following labels to PRs
140112
labeling_instructions:
141-
- label: Python Lang
142-
instructions: Apply when the PR/MR contains changes to python source-code
143-
- label: Solidity Lang
144-
instructions: Apply when the PR/MR contains changes to solidity source-code
145-
- label: Typescript Lang
146-
instructions: Apply when the PR/MR contains changes to javascript or typescript source-code
147-
- label: Ergoscript Lang
148-
instructions: Apply when the PR/MR contains changes to ergoscript source-code
149-
- label: Bash Lang
150-
instructions: >-
151-
Apply when the PR/MR contains changes to shell-scripts or BASH code
152-
snippets
153-
- label: Make Lang
154-
instructions: >-
155-
Apply when the PR/MR contains changes to the file `Makefile` or makefile
156-
code snippets
113+
- label: Safe-Settings Policy
114+
instructions: Apply when PR modifies .github/settings.yml, .github/suborgs/, .github/repos/, or deployment-settings.yml
115+
- label: Workflow
116+
instructions: Apply when PR modifies files inside .github/workflows/
157117
- label: Documentation
158-
instructions: >-
159-
Apply whenever project documentation (namely markdown source-code) is
160-
updated by the PR/MR
161-
- label: Linter
162-
instructions: >-
163-
Apply when the purpose of the PR/MR is related to fixing the feedback
164-
from a linter
118+
instructions: Apply whenever README.md or project markdown docs are updated
165119

166-
# Review instructions that apply to all files
167-
instructions: >-
168-
- Verify that documentation and comments are free of spelling mistakes
169-
- Ensure that test code is automated, comprehensive, and follows testing best practices
170-
- Verify that all critical functionality is covered by tests
171-
- Confirm that the code meets the project's requirements and objectives
172-
- Confirm that copyright years are up-to date whenever a file is changed
173-
- Point out redundant obvious comments that do not add clarity to the code
174-
- Ensure that comments are concise and suggest more concise comment statements if possible
175-
- Discourage usage of verbose comment styles such as NatSpec
176-
- Look for code duplication
177-
- Suggest code completions when:
178-
- seeing a TODO comment
179-
- seeing a FIXME comment
120+
instructions:
121+
- Verify that all YAML safe-settings files follow valid safe-settings schema syntax
122+
- Confirm that sub-organization mappings under .github/suborgs/ contain valid repo lists
123+
- Check that secret references in GitHub Action workflows use secret masks (e.g. secrets.SAFE_SETTINGS_PRIVATE_KEY)
124+
- Ensure documentation is accurate, clear, and up-to-date
180125

181-
# Custom review instructions for specific file patterns
182126
path_instructions:
183-
# TypeScript/JavaScript files
184-
- path: "**/*.{ts,tsx,js,jsx}"
127+
- path: "**/*.yml"
185128
instructions: |
186-
NextJS:
187-
- Ensure that "use client" is being used
188-
- Ensure that only features that allow pure client-side rendering are used
189-
- NextJS best practices (including file structure, API routes, and static generation methods) are used.
190-
191-
TypeScript:
192-
- Avoid 'any', use explicit types
193-
- Prefer 'import type' for type imports
194-
- Review for significant deviations from Google JavaScript style guide. Minor style issues are not a priority
195-
- The code adheres to best practices associated with React
196-
- The code adheres to best practices associated with React PWA
197-
- The code adheres to best practices associated with SPA
198-
- The code adheres to best practices recommended by lighthouse or similar tools for performance
199-
- The code adheres to best practices associated with Node.js
200-
- The code adheres to best practices recommended for performance
201-
202-
Security:
203-
- No exposed API keys or sensitive data
204-
- Use expo-secure-store for sensitive storage
205-
- Validate deep linking configurations
206-
- Check for common security vulnerabilities such as:
207-
- SQL Injection
208-
- XSS (Cross-Site Scripting)
209-
- CSRF (Cross-Site Request Forgery)
210-
- Insecure dependencies
211-
- Sensitive data exposure
212-
213-
Internationalization:
214-
- User-visible strings should be externalized to resource files (i18n)
215-
216-
# HTML files
217-
- path: "**/*.html"
218-
instructions: |
219-
Review the HTML code against the google html style guide and point out any mismatches. Ensure that:
220-
- The code adheres to best practices recommended by lighthouse or similar tools for performance
221-
222-
# CSS files
223-
- path: "**/*.css"
129+
Safe-Settings & Workflow YAMLs:
130+
- Ensure strict indentation (2 spaces)
131+
- Validate key names against safe-settings specification (repository, branches, labels, suborgrepos, restrictedRepos)
132+
- Verify environment variable substitutions use standard GitHub Actions syntax
133+
- path: "**/*.md"
224134
instructions: |
225-
Review the CSS code against the google css style guide and point out any mismatches. Ensure that:
226-
- The code adheres to best practices associated with CSS.
227-
- The code adheres to best practices recommended by lighthouse or similar tools for performance.
228-
- The code adheres to similar naming conventions for classes, ids.
229-
230-
# Python files
231-
- path: "**/*.{py}"
232-
instructions: |
233-
Python:
234-
- Check for major PEP 8 violations and Python best practices.
235-
236-
# Solidity Smart Contract files
237-
- path: "**/*.sol"
238-
instructions: |
239-
Solidity:
240-
- Review the Solidity contracts for security vulnerabilities and adherence to best practices.
241-
- Ensure immutability is used appropriately (e.g., `immutable` and `constant` where applicable).
242-
- Ensure there are no unbounded loops that could lead to gas exhaustion.
243-
- Verify correct and explicit visibility modifiers for all state variables and functions.
244-
- Flag variables that are declared but used only once or are unnecessary.
245-
- Identify potential gas optimization opportunities without compromising readability or security.
246-
- Verify that any modification to contract logic includes corresponding updates to automated tests.
247-
- Ensure failure paths and revert scenarios are explicitly handled and validated.
248-
- Validate proper access control enforcement (e.g., Ownable, RBAC, role checks).
249-
- Ensure consistent and correct event emission for all state-changing operations.
250-
- Confirm architectural consistency with existing contracts (no unintended storage layout changes unless clearly documented).
251-
- Flag major feature additions or architectural changes that were implemented without prior design discussion (if applicable).
252-
- Flag pull requests that mix unrelated changes or multiple concerns in a single submission.
253-
- Ensure security-sensitive logic changes are not introduced without adequate test coverage.
254-
- Review for common smart contract vulnerabilities, including but not limited to:
255-
- Reentrancy
256-
- Improper input validation
257-
- Access control bypass
258-
- Integer overflows/underflows (if using unchecked blocks)
259-
- Front-running risks where applicable
260-
261-
262-
# Javascript/Typescript test files
263-
- path: "**/*.test.{ts,tsx,js,jsx}"
264-
instructions: |
265-
Review test files for:
266-
- Comprehensive coverage of component behavior
267-
- Proper use of @testing-library/react-native
268-
- Async behavior is properly tested
269-
- Accessibility testing is included
270-
- Test descriptions are sufficiently detailed to clarify the purpose of each test
271-
- The tests are not tautological
272-
273-
# Solidity test files
274-
- path: "**/*.test.{sol}"
275-
instructions: |
276-
Review test files for:
277-
- Comprehensive coverage of contract behavior.
278-
- Coverage of success paths, edge cases, and failure/revert scenarios.
279-
- Proper validation of access control restrictions.
280-
- Verification of event emissions where applicable.
281-
- Explicit validation of state changes after each relevant function call.
282-
- Adequate test updates whenever contract logic is modified.
283-
- Deterministic behavior (tests should not rely on implicit execution order or shared mutable state).
284-
- Clear and descriptive test names that reflect the intended behavior being validated.
285-
286-
287-
# Asset files (images, fonts, etc.)
288-
- path: "assets/**/*"
289-
instructions: |
290-
Review asset files for:
291-
- Image optimization (appropriate size and format)
292-
- Proper @2x and @3x variants for different screen densities
293-
- SVG assets are optimized
294-
- Font files are licensed and optimized
295-
296-
# Dependency manifest and lock files (e.g. updated by Dependabot, Renovate)
297-
- path: >-
298-
**/{package.json,package-lock.json,yarn.lock,pnpm-lock.yaml,npm-shrinkwrap.json,requirements.txt,Pipfile,Pipfile.lock,pyproject.toml,poetry.lock,go.mod,go.sum,Cargo.toml,Cargo.lock,pom.xml,build.gradle,build.gradle.kts,gradle.lockfile,*.gemspec,Gemfile,Gemfile.lock}
299-
instructions: |
300-
This file may be modified by a dependency bot (e.g., Dependabot, Renovate).
301-
Perform a structured dependency upgrade analysis:
302-
303-
**1. Version Change Assessment**
304-
- Identify all version bumps (major, minor, patch) and flag major/minor upgrades explicitly.
305-
- Check the official release notes, changelog, or migration guide for each upgraded package.
306-
307-
**2. Breaking Change Detection**
308-
- Breaking changes: removed or renamed APIs, changed function signatures, altered behavior.
309-
- Deprecated APIs: warn if the codebase uses anything deprecated in the new version.
310-
- Configuration changes: new required env vars, config keys, or file structure changes.
311-
- Security fixes: highlight CVE patches and confirm they address known vulnerabilities.
312-
313-
**3. Codebase Compatibility Check**
314-
- Locate all files in the repo that import or use the upgraded dependency.
315-
- For each usage, verify:
316-
- No removed or renamed imports/functions are referenced.
317-
- Constructor/function call signatures are compatible.
318-
- Any default behavior changes do not silently break existing logic.
319-
320-
**4. Risk Analysis**
321-
- Runtime errors: type mismatches, missing attributes, changed return types.
322-
- API incompatibility: breaking interface/type changes (critical for TypeScript).
323-
- Logical bugs: subtle behavior changes that don't throw errors but alter outcomes.
324-
- Performance regressions: flag if release notes mention perf impacts.
325-
326-
**5. Edge Cases to Verify**
327-
- Backward compatibility with currently pinned peer dependencies.
328-
- Changes in default behavior or environment assumptions.
329-
- Peer requirement conflicts introduced by the new version.
330-
- For TypeScript: type/interface changes that may require type assertion updates.
331-
332-
**6. Migration Guidance**
333-
- If official docs provide migration steps, summarize the required changes and flag
334-
specific files in this repo that need updates.
335-
- If no migration is required, confirm this explicitly.
336-
337-
Conclude with a **risk level**: Low / Medium / High, with justification.
135+
Markdown Documentation:
136+
- Check for broken relative links and clear markdown hierarchy (h1, h2, h3)
137+
- Ensure clean formatting without trailing whitespace

.editorconfig

Lines changed: 0 additions & 60 deletions
This file was deleted.

.gitattributes

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)