Follow these instructions to collaborate on AGL through the Gerrit review system.

Please be sure that you are subscribed to the mailing list and of course, you can reach out on IRC at the #automotive channel on irc.libera.chat

Gerrit assigns the following roles to users:

Getting deeper into Gerrit

A comprehensive walk-through of Gerrit is beyond the scope of this document. There are plenty of resources available on the Internet. A good summary can be found here and Basic Gerrit Walkthrough for GitHub Users.

Working with a local clone of the repository

To work on something, whether a new feature or a bugfix:

  1. Open the Gerrit repo page.

  2. Select the repository you wish to work on.

  3. Open a terminal window and clone the project locally using the Clone with git hook URL. Be sure that ssh is also selected, as this will make authentication much simpler. For example, for documentation repository:

    $ git clone "ssh://<LFID>@gerrit.automotivelinux.org:29418/AGL/documentation" && scp -p -P
    29418 <LFID>@gerrit.automotivelinux.org:hooks/commit-msg "documentation/.git/hooks/"
    
  4. Setup user and email for git config

     $ cd documentation
     $ git.config --global user.name "Your Full Name"
     $ git config --global user.email "your@email.com"
    

    NOTE: To only configure for a particular repository :

     $ cd documentation
     $ git.config user.name "Your Full Name"
     $ git config user.email "your@email.com"
    
  5. Create a descriptively-named branch off of your cloned repository

     $ git checkout -b issue-nname
    

Using git review

There's a very useful tool for working with Gerrit called git-review. This command-line tool can automate most of the ensuing sections for you. Ofcourse, reading the information below is also highly recommended so that you understand what's going on behind the scenes.

# for first time use only
$ git review -s
If .gitreview is missing, add the following section to .git/config, and replace <LFID> with your LFID id.

[remote "gerrit"]
   url = ssh://<LFID>@gerrit.automotivelinux.org:29418/AGL/documentation.git
   fetch = +refs/heads/*:refs/remotes/gerrit/*

Then submit your change with git review.

$ cd documentation
$ git review

When you update your patch, you can commit with git commit --amend, and then repeat the git review command.

Typical Review Workflow

Reviewing Using Gerrit

Notifications are sent to the email address in your commit message's Signed-off-by line. Visit your Gerrit dashboard, to check the progress of your requests.

The history tab in Gerrit will show you the in-line comments and the author of the review.