Skip to main content

gerrit_review_robot

A framework for writing bots, that review a code base and post the review together with comments to Gerrit. To write a bot, inherit GerritReviewRobot:

class CheckStyle(GerritReviewRobot):
    # these two are optional: for documentation and the command-line
    name = "Check Style" 
    description = "Uses Flake8 to lint the current change"

    def _do_review(self, review):
        # pass self.diff_lines so that we do not have to analyze files that
        # are not part of the current change
        for error in self._find_linting_errors_in_files(self.diff_files)
            # only include lines in current diff
            if (error.file, error.line_number) in self.diff_lines:
                review.add_comment(
                    error.file, # relative path
                    (error.line_number, error.line_number), # from_line, to_line
                    error.message # message shown in the comment
                )

    def _find_linting_errors_in_files(self, files):
        pass # here comes the actual logic

Metadata

Release files for gerrit-review-robot 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gerrit-review-robot 0.0.7
File Size Uploaded
gerrit_review_robot-0.0.7.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gerrit-review-robot 0.0.7
File Interpreter ABI Platform
gerrit_review_robot-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 19.5 kB

Release files / gerrit_review_robot-0.0.7.tar.gz

Download URL gerrit_review_robot-0.0.7.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
11d847b9545155018ffd8e6d9fc6d7cdda9a5ea78f9430fc3b5deb919139e3ef
BLAKE2b-256 checksum
How to use checksums
3758e57c81901fcf3d07dc07e8ceaeea071e273ceffc594e3f3a531f730c58e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / gerrit_review_robot-0.0.7-py3-none-any.whl

Download URL gerrit_review_robot-0.0.7-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e3274a5474210dc392529d93c2af228bc6edb97f34f34f01b3afb46f2e5f468
BLAKE2b-256 checksum
How to use checksums
80207a89377e5acab71d699b9f34ccaa3de06388302896e9899a2573ecc0f7b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page