-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Update CONTRIBUTING.md #606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
👷 Deploy request for appcut pending review.Visit the deploys page to approve it
|
@VyRajaRao is attempting to deploy a commit to the OpenCut OSS Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughContributing guide updated: expanded installation instructions (including git clone), detailed dependency management with Bun/npm/pnpm, enhanced npm workspace error guidance, augmented focus areas, reordered/expanded contribution and PR steps (tests, docs), and added community response-time note. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. 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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
.github/CONTRIBUTING.md (2)
37-40
: Clarify install location and alternativesAvoid confusion after cd into apps/web by stating explicitly that installation must run from the repository root and list alternatives succinctly.
-5. Install dependencies: We use Bun as our package manager. -From the project root: `bun install` -If you prefer, you can also use npm or pnpm, but Bun is the recommended option. +5. Install dependencies (run from the repository root). We use Bun as our package manager. +From the repository root: `bun install` +Alternatively: `pnpm install` or `npm install` (npm v9+). Bun is recommended.
164-167
: Rebase against upstream/main and show the exact commandsBe explicit about rebasing against the canonical upstream and how to do it.
-7. Rebase your branch against main before opening a PR -8. Push to your fork and create a pull request -9. Look for GitHub issues tagged with good first issue if you’re new +7. Rebase your branch against the latest upstream main before opening a PR +8. Push to your fork and create a pull request +9. Look for GitHub issues tagged with "good first issue" if you’re newRecommended snippet to include under step 7:
git remote add upstream https://github.com/OpenCut-app/OpenCut.git # once per clone git fetch upstream git rebase upstream/main
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/CONTRIBUTING.md
(4 hunks)
🔇 Additional comments (3)
.github/CONTRIBUTING.md (3)
57-59
: Nice additions to focus areasAccessibility, tests, and error/observability emphasis are great callouts.
194-195
: Community notes LGTMClear expectation-setting around maintainer response time and encouraging peer reviews.
184-187
: Specify exact test command & working directory — notest
scripts foundSearched package.json files (apps/web/package.json, package.json, packages/auth/package.json, packages/db/package.json) — none declare a "test" script. Do not change CONTRIBUTING.md to
bun run test
yet; either add the appropriate "test" script in the package that owns tests or document the exact invocation and working directory (e.g.,bun run test
from apps/web or a workspace runner from repo root).Likely an incorrect or invalid review comment.
```bash | ||
git clone https://github.com/<your-username>/opencut.git | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Fix fork clone URL casing and add repo cd step
Use the canonical repo name and guide contributors into the repository directory after cloning.
- git clone https://github.com/<your-username>/opencut.git
+ # HTTPS
+ git clone https://github.com/<your-username>/OpenCut.git
+ # or SSH
+ git clone [email protected]:<your-username>/OpenCut.git
+ cd OpenCut
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```bash | |
git clone https://github.com/<your-username>/opencut.git | |
``` |
🤖 Prompt for AI Agents
In .github/CONTRIBUTING.md around lines 20 to 22, the fork clone URL uses
incorrect casing and is missing the step to change into the repository
directory; update the clone command to use the canonical repo name
(https://github.com/<your-username>/OpenCut.git) and add an immediate `cd
OpenCut` instruction after cloning so contributors are guided into the
repository folder.
- Use consistent naming conventions for variables, components, and files | ||
- Write self-documenting code but add comments where clarity is needed | ||
- Tests should follow the same conventions (framework: Jest/Vitest, check repo for current usage) | ||
- Aim for sufficient test coverage where relevant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
🧩 Analysis chain
Resolve test framework ambiguity (Jest vs Vitest)
Specify the actual framework used to avoid confusion.
-• Tests should follow the same conventions (framework: Jest/Vitest, check repo for current usage)
+• Tests should follow the same conventions (framework: <Jest or Vitest> — see package.json/scripts)
Run this to detect which framework is in use:
🏁 Script executed:
#!/bin/bash
# Inspect test tooling across the repo
fd -g package.json -a -E "node_modules" | while read -r f; do
echo "== $f =="
jq -r '.scripts.test?, .devDependencies?.jest, .devDependencies?.vitest, .devDependencies?.biome' "$f" 2>/dev/null
done | rg -nP 'jest|vitest|biome|test'
Length of output: 0
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "Searching for package.json files..."
# prefer fd when available
if command -v fd >/dev/null 2>&1; then
mapfile -t pkgs < <(fd -HI -t f -e json package.json || true)
else
mapfile -t pkgs < <(find . -type f -iname package.json -not -path '*/node_modules/*' 2>/dev/null || true)
fi
if [ "${#pkgs[@]}" -eq 0 ]; then
echo "NO_PACKAGE_JSON_FOUND"
exit 0
fi
for p in "${pkgs[@]}"; do
echo "== $p =="
if command -v jq >/dev/null 2>&1; then
jq -r '{
testScript: (.scripts.test // "<no test script>"),
hasJest: ((.dependencies? // {}) | has("jest")) or ((.devDependencies? // {}) | has("jest")),
hasVitest: ((.dependencies? // {}) | has("vitest")) or ((.devDependencies? // {}) | has("vitest")),
jestVersion: (.dependencies.jest // .devDependencies.jest // null),
vitestVersion: (.dependencies.vitest // .devDependencies.vitest // null)
}' "$p" || cat "$p"
else
echo "jq not found; printing file head:"
sed -n '1,120p' "$p"
fi
done
echo "Searching repository for Vitest/Jest references and config files (excluding node_modules)..."
if command -v rg >/dev/null 2>&1; then
rg -n --hidden --no-ignore -S --glob '!node_modules' '(^|\W)(vitest|jest)(\W|$)' || true
else
grep -RIn --exclude-dir=node_modules -E '(^|\W)(vitest|jest)(\W|$)' . || true
fi
echo "Looking for typical config files in repo root..."
for cfg in vitest.config.ts vitest.config.js vitest.config.mjs vite.config.ts vite.config.js jest.config.js jest.config.ts jest.config.cjs; do
[ -f "$cfg" ] && echo "FOUND_CONFIG: $cfg"
done
Length of output: 92
🏁 Script executed:
#!/usr/bin/env bash
set -eu
echo "Searching for package.json files..."
tmp="$(mktemp)"
find . -type f -name package.json -not -path '*/node_modules/*' -print0 > "$tmp"
if [ ! -s "$tmp" ]; then
echo "NO_PACKAGE_JSON_FOUND"
rm -f "$tmp"
exit 0
fi
while IFS= read -r -d '' p; do
echo "== $p =="
if command -v jq >/dev/null 2>&1; then
jq -r '
"testScript: " + (.scripts.test // "<no test script>"),
"hasJest: " + ( ((.dependencies? // {}) | has("jest")) or ((.devDependencies? // {}) | has("jest")) | tostring ),
"hasVitest: " + ( ((.dependencies? // {}) | has("vitest")) or ((.devDependencies? // {}) | has("vitest")) | tostring ),
"jestVersion: " + ((.dependencies.jest // .devDependencies.jest) // "null"),
"vitestVersion: " + ((.dependencies.vitest // .devDependencies.vitest) // "null")
' "$p" || sed -n '1,200p' "$p"
else
echo "jq not available; showing package.json head:"
sed -n '1,200p' "$p"
fi
done < "$tmp"
rm -f "$tmp"
echo
echo "Searching repository for 'vitest' or 'jest' references (excluding node_modules)..."
if command -v rg >/dev/null 2>&1; then
rg -n --hidden --no-ignore -S --glob '!node_modules' '(^|\W)(vitest|jest)(\W|$)' || true
else
grep -RIn --exclude-dir=node_modules -E '(^|\W)(vitest|jest)(\W|$)' . || true
fi
echo
echo "Checking for common config files in repo root..."
for cfg in vitest.config.ts vitest.config.js vitest.config.mjs vite.config.ts vite.config.js jest.config.js jest.config.ts jest.config.cjs; do
[ -f "$cfg" ] && echo "FOUND_CONFIG: $cfg"
done
Length of output: 833
Specify test framework in CONTRIBUTING.md — no Jest/Vitest detected
Scanned package.json files (./package.json, ./apps/web/package.json, ./packages/auth/package.json, ./packages/db/package.json): none define a test script or list jest/vitest; update .github/CONTRIBUTING.md (lines 174–177) to name the repo's test framework or remove the “Jest/Vitest” hint and point contributors to the actual package.json test scripts or the chosen framework.
🤖 Prompt for AI Agents
.github/CONTRIBUTING.md lines 174–177: the contribution guide currently
references "Tests should follow the same conventions (framework: Jest/Vitest,
check repo for current usage)" but no Jest/Vitest usage or test script exists in
package.json files; update these lines to either state the actual test framework
used in this repo (and the canonical test script path) if there is one, or
remove the "Jest/Vitest" hint and replace it with a directive telling
contributors to run the repository test via the package.json test script(s)
(e.g., "See package.json test script in the project root or package folder")
and/or link to how to discover the framework (npm/yarn pnpm test or check
package.json), so the CONTRIBUTING guidance matches the repo configuration.
PR Code Suggestions ✨
|
This PR updates CONTRIBUTING.md by clear and more structured format of few already exisiting steps and points under contributions section.
The goal is to make onboarding easier for new contributors.
Summary by CodeRabbit