Skip to content

Latest commit

 

History

History
100 lines (67 loc) · 3.41 KB

File metadata and controls

100 lines (67 loc) · 3.41 KB

Contributing

This document outlines how to propose a change to Code On The Go. By contributing to this project, you agree to abide the terms specified in the CODE OF CONDUCT.

Requirements

  • Android Studio.
  • JDK 17

Git Pre-Commit Hook: Branch Name Enforcement

This project enforces a strict branch naming policy using a Git pre-commit hook. These formats are for core-team contributions that reference an internal ticket. If you are a community contributor without access to that ticket system, use the community/ prefix instead — see Community contributions.

Allowed Branch Formats:

  • ADFA-123 (3 to 5 digit number)
  • feature/ADFA-123
  • bugfix/ADFA-12345
  • chore/ADFA-9999
  • anyprefix/ADFA-#####

Setup

Mac/Linux:

sh ./scripts/install-git-hooks.sh

Windows

scripts\install-git-hooks.bat

Source code format

  • Indents : 2-space
  • Java : GoogleStyle. Either use google-java-format or import this code style.
  • Kotlin: Use ktfmt IntelliJ Plugin and set the code style to Google (internal) . Learn more .
  • XML : Default Android Studio formatter with 2-space indentations.

Propose a change

Before proposing a change, please open an issue and discuss it with our team.

The dev branch is protected and requires all commits to be signed with your GPG key and the commit history to be linear. See protected branches .

To contribute to this project,

  • Fork the repo.
  • Clone the forked repo to your local machine.
  • Open the project.
  • Make your changes.
  • Create a pull request that includes a meaningful title and description.

Community contributions

External contributors don't have access to our internal ticket system, so the ADFA- branch naming and ticket validation used by the core team don't apply to you.

  • After forking (see Propose a change), name your branch with the community/ prefix followed by a short, descriptive summary — for example community/fix-editor-crash.
  • Do not use the ADFA- prefix. It is reserved for internal branches linked to a ticket. When a pull request from a fork uses an ADFA- branch name, the Lint Branch Name check comments on the pull request and fails until you rename the branch to start with community/.

The branch-name pre-commit hook above enforces the ADFA- format, so it is meant for the core team — community contributors don't need to install it. On community/ branches, our build pipeline automatically skips the ticket-specific steps and runs the rest of the checks as usual.

Report issues

Report issues and request features here.

Contact us