Thank you for helping CASA and Ruby for Good. CASA is a Ruby on Rails application that helps Court Appointed Special Advocate organizations support volunteers, supervisors, and administrators.
By participating in this project, you agree to follow the Ruby for Good code of conduct.
Use the channel that keeps your question closest to the work:
- Ask issue-specific questions in the GitHub issue.
- Ask pull request questions in the pull request thread.
- Join the Ruby for Good Slack
and use the
#casachannel for fast help. - Join the CASA Discord for office hours and project discussion.
- Check the CASA Google Calendar for office hours and stakeholder meetings.
Maintainers usually check issues and pull requests every day or three. If you
have been blocked for a few days, leave a concise GitHub comment or ask in
#casa.
The README is the main setup guide. Start there for the current Ruby, Node.js, PostgreSQL, seed user, and local server instructions.
Fast setup options:
- Use GitHub Codespaces if you want a browser-based environment.
- Follow the README local setup instructions if you want to run CASA on your machine.
- Use the Docker setup guide if you prefer containers.
Platform-specific notes:
After setup, verify the app with:
bin/setup
bin/devThen open http://localhost:3000/ and log in with one of the README seed users.
When you pull fresh changes from main, run:
bin/updateGood starting places:
- Good First Issue issues are intended for new contributors.
- Help Wanted issues are open to community contributors.
- Unassigned open issues are available if no recent comment says someone is already working on them.
Before starting:
- Read the issue and recent comments.
- Make sure the issue is not assigned.
- Comment that you would like to work on it and ask to be assigned.
- Wait for a maintainer if the issue needs clarification.
Only take multiple issues when they are closely related and can be solved in the same pull request. If you want to work on something that does not have an issue, open an issue first so maintainers can confirm the direction.
If you cannot continue an assigned issue, comment on the issue so someone else can pick it up. The repository warns contributors after 10 days of inactivity and may unassign inactive issues after 15 days.
Fork the repository unless a maintainer has given you direct commit access.
Add the upstream remote once:
git remote add upstream https://github.com/rubyforgood/casa.gitStart each issue from an updated main branch:
git checkout main
git pull upstream main
git checkout -b 6910-contributing-guideUse a short, descriptive branch name. Including the issue number helps reviewers,
for example 6910-contributing-guide or 5979-learning-hours-report.
Keep the change focused on the issue. Small pull requests are easier to review and merge than broad rewrites.
Run the smallest useful test command while developing, then run the broader checks before opening a ready pull request.
Common test commands:
bundle exec rspec
npm run testTargeted examples:
bundle exec rspec spec/models/user_spec.rb
bundle exec rspec spec/requests/case_contacts_spec.rb
npm run test -- app/javascript/__tests__/validated_form.test.jsCommon lint commands:
bundle exec standardrb
bundle exec erb_lint --lint-all
npm run lintTo run the repository's fixer commands:
bin/lintTo lint only files staged or changed on your branch:
./bin/git_hooks/lint --staged
./bin/git_hooks/lint --unpushedFor documentation-only pull requests, there may not be a useful automated test. In that case, validate links and formatting, then explain that in the pull request's testing section.
Add or update tests for behavior changes. A good pull request includes a test that would fail without the change and pass with it.
Use the test type that matches the behavior:
- Model specs for validations, associations, scopes, and model-level business rules.
- Request specs for routes, controller behavior, permissions, and responses.
- System specs for user-visible workflows, JavaScript-driven UI, and role-based behavior.
- View or component specs for rendering changes that do not need a full browser flow.
- Policy specs for authorization changes.
- Service, job, mailer, and importer specs for the matching application object.
- Jest tests for JavaScript in
app/javascript.
For UI changes, run the app locally and include screenshots in the pull request. If a change affects permissions, test at least one allowed role and one denied role.
Open a draft pull request when you want early feedback. Mark it ready for review
when the code, tests, and description are ready. If maintainers are using labels,
use or ask for 🚧 Status: WIP while the pull request is not ready and Ready
when it is ready.
Use a short, action-oriented pull request title. Including the issue number is helpful when the title would otherwise be ambiguous, for example:
6910 - Flesh out contributor guide
Fill out the pull request template:
- Link the issue with
Resolves #1234when the pull request should close it. - Explain what changed and why.
- List the exact tests and linters you ran.
- Include screenshots for UI changes.
- Note any follow-up work that should become a separate issue.
Before requesting review:
- Rebase or merge the latest
mainif your branch is stale. - Run the relevant tests and linters.
- Review your own diff for unrelated files, debugging output, and missing docs.
- Push your branch and open the pull request from your fork.
Automated checks run at the bottom of the pull request. Most of them need to pass
before merge. If a CI failure looks flaky, post the failed build link in
#casa.
Maintainers may ask for changes. Respond in the pull request thread, push follow-up commits to the same branch, and re-request review when ready. Maintainers decide when a pull request is ready to merge.
Update documentation when you add setup steps, commands, workflows, permissions,
background jobs, user-facing behavior, or anything else that future contributors
will need to understand. The README, doc/ directory, and
wiki are the main documentation
surfaces.