qiBuild documentation

qisrc.review – Using code review (gerrit)

Handling pushing changes to gerrit

qisrc.review.fetch_gerrit_hook_ssh(path, username, server, port=None)

Fetch the commit-msg hook from gerrit

qisrc.review.check_gerrit_connection(username, server, ssh_port=29418)

Check that the user can connect to gerrit with ssh

qisrc.review.ask_gerrit_username(server, ssh_port=29418)

Run a wizard to try to configure gerrit access If that fails, ask the user for its username If that fails, give up and suggest upload the public key

qisrc.review.get_gerrit_username(server, ssh_port)

Get the username to use when using code review. Read it from the config file, or ask it and check it works

qisrc.review.setup_project(project)

Setup a project for code review: If there is Remote configured for code review, using the ssh protocol, use it to fetch the gerrit commit-msg hook

qisrc.review.push(project, branch, bypass_review=False, dry_run=False, reviewers=None, topic=None)

Push the changes for review. Unless review is False, in this case, simply update the remote gerrit branch :param reviewers: A list of reviewers to invite to review

qisrc.review.set_reviewers(refs, reviewers, username, server, ssh_port)

Set reviewers using gerrit set-reviewers command :param refs: A list of references to patchsets, can be SHA1s or Change-Ids :param reviewers: A list of Gerrit reviewers, username or group name, no e-mails