• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. RBTools 5.x
    2. Version 5.x
    3. Version 4.x
    4. Version 3.x
    5. Version 2.0
    6. Version 1.0
    7. Version 0.7
    8. Version 0.6
    9. Version 0.5
    10. rbt Command
    11. Commands
    12. status-update
  • Home
  • Installing RBTools
  • rbt Command
  • Configuration
  • Authenticating to Review Board
  • Repository Configuration
  • Per-User Configuration
  • Team Foundation Server Configuration
  • Commands
  • alias
  • api-get
  • attach
  • clear-cache
  • close
  • diff
  • install
  • land
  • list-repo-types
  • login
  • logout
  • patch
  • post
  • publish
  • review
  • setup-completion
  • setup-repo
  • stamp
  • status
  • status-update
  • RBTools Workflows
  • Using RBTools With Cliosoft SOS
  • Using RBTools with Git
  • Using RBTools with HCL VersionVault and IBM ClearCase
  • Using RBTools With Perforce
  • RBTools Python API
  • Overview of the Python API Client
  • Tutorial
  • Resource-Specific Functionality
  • Module and Class References
  • rbtools
  • rbtools.deprecation
  • rbtools.api
  • rbtools.api.cache
  • rbtools.api.capabilities
  • rbtools.api.client
  • rbtools.api.decode
  • rbtools.api.decorators
  • rbtools.api.errors
  • rbtools.api.factory
  • rbtools.api.request
  • rbtools.api.resource
  • rbtools.api.transport
  • rbtools.api.transport.sync
  • rbtools.api.utils
  • rbtools.clients
  • rbtools.clients.base
  • rbtools.clients.base.patch
  • rbtools.clients.base.registry
  • rbtools.clients.base.repository
  • rbtools.clients.base.scmclient
  • rbtools.clients.errors
  • rbtools.clients.bazaar
  • rbtools.clients.clearcase
  • rbtools.clients.cvs
  • rbtools.clients.git
  • rbtools.clients.mercurial
  • rbtools.clients.perforce
  • rbtools.clients.plastic
  • rbtools.clients.sos
  • rbtools.clients.svn
  • rbtools.clients.tfs
  • rbtools.config
  • rbtools.config.config
  • rbtools.config.loader
  • rbtools.diffs
  • rbtools.diffs.patches
  • rbtools.diffs.patcher
  • rbtools.diffs.tools
  • rbtools.diffs.tools.backends
  • rbtools.diffs.tools.backends.gnu
  • rbtools.diffs.tools.base
  • rbtools.diffs.tools.base.diff_file_result
  • rbtools.diffs.tools.base.diff_tool
  • rbtools.diffs.tools.errors
  • rbtools.diffs.tools.registry
  • rbtools.diffs.writers
  • rbtools.commands
  • rbtools.commands.main
  • rbtools.commands
  • rbtools.commands.base
  • rbtools.commands.base.commands
  • rbtools.commands.base.errors
  • rbtools.commands.base.options
  • rbtools.commands.base.output
  • rbtools.commands.alias
  • rbtools.commands.api_get
  • rbtools.commands.attach
  • rbtools.commands.clearcache
  • rbtools.commands.close
  • rbtools.commands.diff
  • rbtools.commands.info
  • rbtools.commands.install
  • rbtools.commands.land
  • rbtools.commands.list_repo_types
  • rbtools.commands.login
  • rbtools.commands.logout
  • rbtools.commands.patch
  • rbtools.commands.post
  • rbtools.commands.publish
  • rbtools.commands.review
  • rbtools.commands.setup_completion
  • rbtools.commands.setup_repo
  • rbtools.commands.stamp
  • rbtools.commands.status
  • rbtools.commands.status_update
  • rbtools.hooks
  • rbtools.hooks.common
  • rbtools.hooks.git
  • rbtools.testing
  • rbtools.testing.api
  • rbtools.testing.api.payloads
  • rbtools.testing.api.transport
  • rbtools.testing.commands
  • rbtools.testing.testcase
  • rbtools.testing.transport
  • rbtools.utils
  • rbtools.utils.aliases
  • rbtools.utils.browser
  • rbtools.utils.checks
  • rbtools.utils.commands
  • rbtools.utils.console
  • rbtools.utils.diffs
  • rbtools.utils.encoding
  • rbtools.utils.errors
  • rbtools.utils.filesystem
  • rbtools.utils.graphs
  • rbtools.utils.mimetypes
  • rbtools.utils.process
  • rbtools.utils.repository
  • rbtools.utils.review_request
  • rbtools.utils.source_tree
  • rbtools.utils.users
  • Glossary
  • General Index
  • Python Module Index
  • Release Notes
  • status-update¶

    rbt status-update is used to create, edit, or delete status updates on a review request.

    Status updates can be used by code checking tools, such as internal scripts, CI systems, or Review Bot, to communicate that code is being analyzed or to communicate the result of that analysis, usually in the form of a review.

    This command makes it easy to integrate your own code checking or review request validation scripts with Review Board.

    Usage¶

    $ rbt status-update <subcommand> [options] 
    

    This command provides several subcommands:
    • get
    • set
    • delete

    Upgrading from RBTools 1.x or 2.x

    RBTools 2 required that the get, set, or delete action be last. In RBTools 3 and up, it must be before any options.

    The old form is supported in RBTools 3, but will be removed in RBTools 4.

    rbt status-update get¶

    This is is used to list all the status updates on a review request, or to display information on a particular status update.

    It requires the -r/--review-request-id option, and can take a -s/--status-update-id to specify a particular status update.

    Usage¶

    $ rbt status-update get [options] 
    

    Listing Status Updates¶

    To list status updates, run rbt status-update get -r <review_request_id> without --status-update-id. For example:

    $ rbt status-update get -r 123
    180  reviewbot.17: <done-failure> cpplint: failed.
    181  reviewbot.18: <done-success> GoTool: passed.
    182  reviewbot.19: <done-success> ShellCheck: passed.
    

    This information can also be returned in JSON form by using --json:

    $ rbt status-update get -r 123 --json
    {
        "status": "success",
        "status_updates": [
            {
                "description": "failed.",
                "extra_data": {
                    "can_retry": true
                },
                "id": 180,
                "service_id": "reviewbot.17",
                "state": "done-failure",
                "summary": "cpplint",
                "timeout": 60
            },
            {
                "description": "passed.",
                "id": 181,
                "service_id": "reviewbot.18",
                "state": "done-success",
                "summary": "GoTool",
                "timeout": 60
            },
            {
                "description": "passed.",
                "id": 182,
                "service_id": "reviewbot.19",
                "state": "done-success",
                "summary": "ShellCheck",
                "timeout": 60
            }
        ]
    }
    

    If anything goes wrong, you’ll receive an error:

    $ rbt status-update get -r 123 --json
    {
        "errors": [
            "Something terrible happened and hopefully this explains why."
        ],
        "status": "failed"
    }
    

    Displaying a Status Update¶

    rbt status-update get -r <review_request_id> -s <status_update_id> can be used to display information on a particular status update. For example:

    $ rbt status-update get -r 123 -s 180
    180  reviewbot.17: <done-failure> cpplint: failed.
    

    This information can also be returned in JSON form by using --json:

    $ rbt status-update get -r 123 -s 180 --json
    {
        "status": "success",
        "status_updates": [
            {
                "description": "failed.",
                "extra_data": {
                    "can_retry": true
                },
                "id": 180,
                "service_id": "reviewbot.17",
                "state": "done-failure",
                "summary": "cpplint",
                "timeout": 60
            }
        ]
    }
    

    If anything goes wrong, you’ll receive an error:

    $ rbt status-update get -r 123 -s 180 --json
    {
        "errors": [
            "Something terrible happened and hopefully this explains why."
        ],
        "status": "failed"
    }
    

    Options¶

    -d, --debug¶

    Displays debug output.

    This information can be valuable when debugging problems running the command.

    The default can be set in DEBUG in .reviewboardrc.

    --json¶

    Output results as JSON data instead of text.

    The default can be set in JSON_OUTPUT in .reviewboardrc.

    New in version 3.0.

    Status Update Options¶

    -s <id>, --status-update-id <id>¶

    A specific status update to display.

    rbt status-update set¶

    This is used to create or modify a status update on a review request. It’s useful for custom CI, build, or code analysis integrations that need to report results on a review request.

    Usage¶

    $ rbt status-update set [options] 
    

    Creating a Status Update¶

    When creating a status update, you need to specify the following:

    • A service ID (--service-id) that uniquely identifies this category of status update (e.g., internal-code-checker.styles).

    • An initial summary (--summary) naming this status update (e.g., Code Compliance Checker).

    Optionally, you may also want to specify:

    • A timeout in seconds (--timeout) before the status update is listed as having failed due to timeout.

    • A URL (--url) and accompanying link text (--url-text) for monitoring results.

    • A description (--description) shown beside the summary name conveying the current status (e.g., starting...).

    • A change ID (“Review Request Changed” box) to attach the status update to (--change-id).

    For example:

    $ rbt status-update set \
          -r 123 \
          --service-id internal-code-checker.styles \
          --summary "Code Compliance Checker" \
          --description "starting..." \
          --timeout 120 \
          --url https://ci.eng.example.com/codechecker/builds/12345/ \
          --url-text "Build Log"
    234  internal-code-checker.styles: <pending> starting...
    

    You can use --json to return a payload containing the information:

    $ rbt status-update set \
          -r 123 \
          --service-id internal-code-checker.styles \
          --summary "Code Compliance Checker" \
          --description "starting..." \
          --timeout 120 \
          --url https://ci.eng.example.com/codechecker/builds/12345/ \
          --url-text "Build Log" \
          --json
    {
        "status": "success",
        "status_updates": [
            {
                "description": "starting...",
                "id": 234,
                "service_id": "internal-code-checker.styles",
                "state": "pending",
                "summary": "Code Compliance Checker",
                "timeout": 120
            }
        ]
    }
    

    If anything goes wrong, you’ll receive an error:

    $ rbt status-update set \
          -r 123 \
          --service-id internal-code-checker.styles \
          --summary "Code Compliance Checker" \
          --description "starting..." \
          --timeout 120 \
          --url https://ci.eng.example.com/codechecker/builds/12345/ \
          --url-text "Build Log" \
          --json
    {
        "errors": [
            "Something terrible happened and hopefully this explains why."
        ],
        "status": "failed"
    }
    

    Modifying a Status Update¶

    Eventually you’ll want to report a result for your status update, indicating if the checks have succeeded, failed, or triggered some kind of error. You may want to add a review, or link to some result.

    To modify a status update, you’ll use rbt status-update set again, but you’ll specify -s/--status-update-id to indicate which status update you’re modifying.

    You’ll probably want to specify some of the following:

    • The new state of the change (--state). This can be one of: pending, done-failure, done-success, error

    • The new description (--description) shown beside the summary name, conveying the new status (e.g., passed.)

    • A new URL (--url) and accompanying link text (--url-text) for the results.

    • A review with any failures (--review).

      See Reporting Failed Results below.

    For example, if successful:

    $ rbt status-update set \
          -r 123 \
          -s 234 \
          --state done-success \
          --description "passed."
    234  internal-code-checker.styles: <done-success> passed.
    

    Or if checks found some problems to report:

    $ rbt status-update set \
          -r 123 \
          -s 234 \
          --state done-failure \
          --description "failed." \
          --review results.json
    234  internal-code-checker.styles: <done-failure> failed.
    

    You can use --json to return a payload containing the information:

    $ rbt status-update set \
          -r 123 \
          -s 234 \
          --state done-success \
          --description "passed." \
          --json
    {
        "status": "success",
        "status_updates": [
            {
                "description": "failed.",
                "id": 234,
                "service_id": "internal-code-checker.styles",
                "state": "done-failure",
                "summary": "Code Compliance Checker",
                "timeout": 120
            }
        ]
    }
    

    If anything goes wrong, you’ll receive an error:

    $ rbt status-update set \
          -r 123 \
          -s 234 \
          --state done-success \
          --description "passed." \
          --json
    {
        "errors": [
            "Something terrible happened and hopefully this explains why."
        ],
        "status": "failed"
    }
    

    Reporting Failed Results¶

    When reporting a done-failure result, you’ll want to include some information to help the owner of the change know what went wrong.

    This can be done by generating a JSON file containing information on a review, and then passing that filename to --review. Any comments or text provided in this file will be filed on the review request, attached to the results of your status update.

    The format of the file looks like:

    {
        // Optional: Header/footer for the review.
        "review": {
            // Optional: Header text to display above the list of comments.
            "body_top": "<string>",
    
            // Optional: Footer text to display below the list of comments.
            "body_bottom": "<string>"
        },
    
        // Optional list of comments on diffs.
        "diff_comments": [
            {
                // Required: The ID of the file being reviewed
                "filediff_id": <int>,
    
                // Required: The 1-based line number for the comment.
                "first_line": <int>,
    
                // Optional: Set to true to open an issue.
                "issue_opened": true|false,
    
                // Required: The number of lines the comment should span.
                "num_lines": <int>,
    
                // Required: Text shown in the comment.
                "text": "<string>",
    
                // Required: Type of text formatting ("plain" or "markdown").
                "text_type": "plain|markdown"
            },
            ...
        ],
    
        // Optional list of general comments, not bound to a file or diff.
        "general_comments": [
            {
                // Optional: Set to true to open an issue.
                "issue_opened": true|false,
    
                // Required: Text shown in the comment.
                "text": "<string>",
    
                // Required: Type of text formatting ("plain" or "markdown").
                "text_type": "plain|markdown"
            },
            ...
        ]
    }
    

    Anything listed as optional can be omitted.

    For example:

    {
        "review": {
            "body_top": "Header comment"
        },
        "diff_comments": [
            {
                "filediff_id": 1,
                "first_line": 1,
                "issue_opened": true,
                "num_lines": 1,
                "text": "Adding a comment on a diff line",
                "text_type": "markdown"
            },
            {
                "filediff_id": 2,
                "first_line": 2,
                "issue_opened": true,
                "num_lines": 1,
                "text": "Adding a second diff comment",
                "text_type": "markdown"
            }
        ],
        "general_comments": [
            {
                "text": "Adding a general comment",
                "text_type": "markdown"
            }
        ]
    }
    

    Options¶

    -d, --debug¶

    Displays debug output.

    This information can be valuable when debugging problems running the command.

    The default can be set in DEBUG in .reviewboardrc.

    --json¶

    Output results as JSON data instead of text.

    The default can be set in JSON_OUTPUT in .reviewboardrc.

    New in version 3.0.

    Status Update Options¶

    -s <id>, --status-update-id <id>¶

    Specifies which status update from the review request.

    --review <file path>¶

    JSON formatted file defining details of review(s) to add to status update.

    --change-id <id>¶

    The change to a review request which this status update applies to. When not specified, the status update is for the review request as initially published.

    --description <text>¶

    A user-visible description of the status update.

    --service-id <service id>¶

    A unique identifier for the service providing the status update.

    --state <state>¶

    The current state of the status update.

    --summary <text>¶

    A user-visible short summary of the status update.

    --timeout <timeout>¶

    Timeout for pending status updates, measured in seconds.

    --url <url>¶

    URL to link to for more details about the status update.

    --url-text <url text>¶

    The text to use for the --url link.

    rbt status-update delete¶

    This is used to delete a status update.

    This may be useful if you’re playing around with the command. In production, once a status update is filed on a review request, it should only be resolved by updating the state, not deleting it.

    Usage¶

    $ rbt status-update delete [options] 
    

    When deleting a status update, -s/--status-update-id is required.

    For example:

    $ rbt status-update delete -r 123 -s 234
    Status update 234 has been deleted.
    

    This information can also be returned in JSON form by using --json:

    $ rbt status-update delete -r 123 -s 234 --json
    {
        "status": "success"
    }
    

    If anything goes wrong, you’ll receive an error:

    $ rbt status-update delete -r 123 -s 234 --json
    {
        "errors": [
            "Something terrible happened and hopefully this explains why."
        ],
        "status": "failed"
    }
    

    Options¶

    -d, --debug¶

    Displays debug output.

    This information can be valuable when debugging problems running the command.

    The default can be set in DEBUG in .reviewboardrc.

    --json¶

    Output results as JSON data instead of text.

    The default can be set in JSON_OUTPUT in .reviewboardrc.

    New in version 3.0.

    Status Update Options¶

    -s <id>, --status-update-id <id>¶

    Specifies which status update from the review request.

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • Usage
    • rbt status-update get
      • Usage
      • Listing Status Updates
      • Displaying a Status Update
      • Options
        • Status Update Options
    • rbt status-update set
      • Usage
      • Creating a Status Update
      • Modifying a Status Update
      • Reporting Failed Results
      • Options
        • Status Update Options
    • rbt status-update delete
      • Usage
      • Options
        • Status Update Options