Contributing
Thanks for helping. This file covers contributing to the template itself; AGENTS.md holds the rules for code written in it, and applies here too. Everyone taking part follows the code of conduct.
Before you start
Section titled “Before you start”- Questions and ideas: ask in Discussions.
- Bugs: open an issue with the steps to reproduce, the platform and the versions (
npx react-native info). - Typos and small doc fixes: open a pull request straight away, no issue needed.
- Anything bigger, and changes to a decision (a library, a pattern, a convention): open an issue first and wait for a reply, so you don’t build something that can’t be merged. Decisions are recorded in docs/decisions/; a change gets a new ADR rather than an edit to the old one.
- Security issues: don’t open an issue; see SECURITY.md.
Issues labelled good first issue are small and well described; help wanted ones are open to anyone.
To take one, comment on it; the maintainer assigns it to you, so two people don’t do the same work. If
you can’t finish, say so and it goes back to the list.
What happens to your issue
Section titled “What happens to your issue”New issues are labelled needs-triage and get a first reply within three days. The maintainer
reproduces it or asks for what’s missing, then either keeps it open (labelled good first issue or
help wanted if anyone can take it, or assigned if someone is on it) or closes it with a reason
(duplicate, wontfix, invalid). Questions are moved to Discussions.
Making a change
Section titled “Making a change”pnpm installbundle installpnpm check # types, lint, format, boundaries, tests- Use Conventional Commits (
feat:,fix:,docs:…); commitlint checks them on commit. - Mark demo-only code with
// @example(AGENTS.md › Demo code) and runscripts/ci/check-strip-examples.sh, sopnpm strip-exampleskeeps working. - Mark code that exists only for Sign in with Apple and Google with
// @socialand runscripts/ci/check-remove-social-sign-in.sh, sopnpm remove-social-sign-inkeeps working. - Changed something the generators produce (a convention, a primitive, the folder layout)? Update
scripts/generate.tsand theadd-*skills in.claude/skills/to match, and runscripts/ci/check-generators.sh. - Native change: mark it
[bareship]and add a row to docs/native-changes.md. - New dependency: check it against docs/version-matrix.md and record it there.
- Touched packaging (
template.config, dotfiles, the name placeholder)? Runscripts/ci/check-template-init.sh(docs/packaging.md). - Touched the installer (
packages/create-bareship/, ADR 0018)? Keep it free of dependencies and runscripts/ci/check-create.sh, which creates apps through both npm packages. Its version always matches the rootpackage.json. - User-visible change? Add a line under Unreleased in CHANGELOG.md.
Opening a pull request
Section titled “Opening a pull request”- Fork the repository (maintainers branch in it directly) and branch from an up-to-date
main. Name the branch after the change:fix/offline-retry,docs/quick-start-windows. - Keep it to one change. A fix, a refactor it needed and an unrelated typo are three pull requests. Small pull requests get reviewed the same day; a 100-file one waits.
- Title it as a Conventional Commit:
fix(offline): retry queued likes after sign-in. Pull requests are squash-merged, so the title becomes the commit onmain, and a check fails until it fits. Add!for a breaking change (feat(i18n)!: …). - Fill in the template: why (link the issue with
Closes #12), what changed, how you tested it on which platforms, and screenshots for anything on screen. Leave Allow edits by maintainers ticked, so small fixes (a title, a changelog line) don’t need a round trip. - Open it as a draft if you want early feedback, and mark it ready when the checks pass.
- Checks: CI runs
pnpm check, the release-bundle check and the title check, and all must pass to merge. On your first pull request they show “awaiting approval” until the maintainer starts them, a GitHub safeguard for workflows from forks; after that they run on every push. The slow iOS and Android builds run only when a maintainer adds thenativelabel (ADR 0014), so mention it if you changed native code. - Review: expect a first reply within three days. Push fixes as new commits rather than force-pushing,
so the review can show what changed; they’re squashed on merge anyway. Update from
mainwhen GitHub says the branch is out of date (the Update branch button does it). Reply to or resolve each review comment: open conversations block the merge.
Don’t base one pull request on another. If you must, say so at the top of the second and wait until the
first is merged before merging it: GitHub retargets it to main only once the first branch is deleted.
After it’s merged
Section titled “After it’s merged”- The maintainer squash-merges it, so
maingets one commit with your title (sometimes reworded) and you as its author. The linked issue closes by itself. - Delete the branch in your fork; GitHub deletes branches only in this repository.
- It reaches npm with the next release. Your changelog line ships with it, credited to you, and the GitHub release lists your pull request.
A pull request that’s waiting on you for 30 days is closed with a note; reopen it whenever you’re back.
Maintainers: triage, labels and the merge checklist are in docs/maintaining.md; releasing is in docs/packaging.md › Publish.
Editing the website
Section titled “Editing the website”The website (website/, Astro Starlight) is built from the repo’s own docs, so most pages are edited where
they already live:
| Page | Edit |
|---|---|
| Environments, Architecture, Generators, Going live, Releasing, Demo build, Native changes, Version matrix, Best-practices audit | The file in docs/ |
| Decisions | docs/decisions/ |
| Styling, Testing, Project rules | The matching section of AGENTS.md |
| Contributing, Changelog | CONTRIBUTING.md, CHANGELOG.md |
| Home, Introduction, Quick start, FAQ, Offline, Built for AI agents | website/content/ |
Every page’s Edit page link opens the right file. website/src/content/docs/ is generated: changes there
are overwritten.
pnpm site:dev # http://localhost:4321, updates as you edit docs/, AGENTS.md or website/content/pnpm site:build # the site in website/dist/, then the link check- Add a page from
docs/: add it toPAGESinwebsite/scripts/sync-docs.mjsand to the sidebar inwebsite/astro.config.mjs. A page written only for the site goes inwebsite/content/and the sidebar. - Links: link between docs with relative paths (
going-live.md#use-your-api) as usual; the site rewrites them.pnpm site:buildfails and names the link when one points to a missing page or heading, so run it after renaming a file or rewording a heading. - Frontmatter: quote a
descriptionthat contains a colon, or the build fails. - If
pnpm site:devkeeps showing an error you’ve fixed, restart it withpnpm site:dev --force.
License
Section titled “License”By contributing you agree that your contribution is licensed under the MIT License.
Made by Praveen Singh, Senior React Native engineer