• 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. Review Board dev
    2. Version 7.x
    3. Version 6.x
    4. Version 5.0
    5. Version 4.0
    6. Version 3.0
    7. Version 2.5
    8. Version 2.0
    9. Version 1.7
    10. Version 1.6
    11. Version 1.5
    12. Version 1.0
    13. Extending Review Board
    14. Module and Class References
    15. reviewboard.hostingsvcs.base.hosting_service
  • Home
  • Users Guide
  • Getting Started
  • Introduction
  • What is Code Review?
  • Review Board Workflows
  • Account Settings
  • Dashboard
  • Working with Review Requests
  • Overview
  • Creating Review Requests
  • Editing Fields
  • Uploading Diffs
  • Uploading File Attachments
  • Publishing Review Requests
  • Closing Review Requests
  • Reviewing
  • Reviews and Comments
  • The Review Banner
  • Managing and Publishing Drafts
  • Issue Tracking
  • Reviewing Code (Diffs)
  • Reviewing File Attachments
  • Reviewing Images
  • Reviewing Markdown Files
  • Reviewing Text Files
  • Creating and Editing Reviews
  • Approving Changes (Ship It!)
  • Replying to Comments
  • Automated Code Reviews
  • Searching
  • Quick Search
  • Full-Text Search
  • Using Markdown
  • Administration Guide
  • Installation
  • Installing Review Board
  • Linux System Compatibility
  • Installing with Docker
  • Manually Installing on Linux
  • Installing on macOS
  • Installing on Windows
  • Installing Development Releases
  • Creating a Review Board Site
  • Upgrading
  • Upgrading Review Board
  • Upgrading Review Board Sites
  • Optimization
  • Optimizing and Scaling Review Board
  • Administration UI
  • Overview of the Administration UI
  • Administrator Dashboard
  • Database Management
  • Configuration
  • Site Settings
  • General Settings
  • Authentication Settings
  • Avatar Services Settings
  • E-Mail Settings
  • Diff Viewer Settings
  • Logging Settings
  • SSH Settings
  • File Storage Settings
  • User Privacy Settings
  • Search Settings
  • Access Control
  • Working with E-Mail
  • Default Reviewers
  • Permission Groups
  • Repositories
  • Bazaar Repositories
  • CVS Repositories
  • Git Repositories
  • HCL VersionVault and IBM ClearCase
  • Mercurial Repositories
  • Perforce Repositories
  • Subversion Repositories
  • Assembla Repositories
  • AWS CodeCommit Repositories
  • Beanstalk Repositories
  • Bitbucket Repositories
  • Bitbucket Server Repositories
  • Codebase HQ Repositories
  • Fedora Hosted Repositories
  • Gerrit Repositories
  • GitHub Repositories
  • GitHub Enterprise Repositories
  • GitLab Repositories
  • Gitorious Repositories
  • Cliosoft SOS Repositories
  • SourceForge Repositories
  • Unfuddle STACK Repositories
  • VisualStudio.com Repositories
  • Review Groups
  • Users
  • WebHooks
  • Extensions
  • Integrations
  • Asana Integration
  • CircleCI Integration
  • Discord Integration
  • I Done This Integration
  • Jenkins CI Integration
  • Matrix Integration
  • Mattermost Integration
  • Microsoft Teams Integration
  • Slack Integration
  • Travis CI Integration
  • Trello Integration
  • Site Maintenance
  • The rb-site Tool
  • Advanced Management Commands
  • Monitoring Review Board
  • Health Checks
  • Web API Guide
  • Resource Tree
  • Resources
  • Root List Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Extension List Resource
  • Extension Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Info Resource
  • Repository User List Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Request List Resource
  • Review Request Resource
  • Change List Resource
  • Diff Context Resource
  • Diff List Resource
  • File Attachment List Resource
  • Review List Resource
  • Review Request Draft Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Status Update List Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Root Review List Resource
  • Search Resource
  • Server Info Resource
  • Session Resource
  • User List Resource
  • User Resource
  • API Token List Resource
  • Archived Review Request List Resource
  • Muted Review Request List Resource
  • User File Attachment List Resource
  • Watched List Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • Server Info Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Default Reviewer Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • File Diff List Resource
  • File Diff Resource
  • Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • File Diff List Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • Diff Commit Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Diff File Attachment Resource
  • Original File Resource
  • Patched File Resource
  • Extension List Resource
  • Extension Resource
  • Extension Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • Hosting Service Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository User Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User Resource
  • Change List Resource
  • Change Resource
  • Change Resource
  • File Attachment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Comment List Resource
  • File Diff List Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Comment List Resource
  • Review Request List Resource
  • Review Request Resource
  • Change List Resource
  • Change Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • File Attachment List Resource
  • File Attachment Resource
  • Review List Resource
  • Review Resource
  • Review Draft Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft File Attachment List Resource
  • Draft Screenshot List Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Status Update List Resource
  • Status Update Resource
  • Review Request Resource
  • Change List Resource
  • Change Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • File Diff List Resource
  • File Attachment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • Review List Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review File Attachment Comment List Resource
  • Review General Comment List Resource
  • Review Reply List Resource
  • Review Screenshot Comment List Resource
  • Review Draft Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Status Update List Resource
  • Status Update Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Comment List Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft File Attachment Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Draft Screenshot Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft File Diff List Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Root Review List Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Review List Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Draft Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Draft Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply General Comment List Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Draft Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Draft Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review General Comment Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Screenshot Comment Resource
  • Review Reply Draft Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Draft Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Screenshot Comment Resource
  • Search Resource
  • Status Update List Resource
  • Status Update Resource
  • Status Update Resource
  • API Token List Resource
  • API Token Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • Muted Review Request Resource
  • Session Resource
  • User List Resource
  • User Resource
  • API Token List Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Request List Resource
  • User Resource
  • API Token List Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • User File Attachment Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Watched Review Request Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • WebHook Resource
  • Errors
  • 100 - Does Not Exist
  • 101 - Permission Denied
  • 102 - Invalid Attribute
  • 103 - Not Logged In
  • 104 - Login Failed
  • 105 - Invalid Form Data
  • 106 - Missing Attribute
  • 107 - Enable Extension Failed
  • 108 - Disable Extension Failed
  • 109 - Extension Already Installed
  • 110 - Install Extension Failed
  • 111 - Duplicate Item
  • 112 - OAuth2 Missing Scope Error
  • 113 - OAuth2 Access Denied Error
  • 114 - Rate Limit Exceeded
  • 203 - Invalid Change Number
  • 204 - Change Number In Use
  • 205 - Missing Repository
  • 206 - Invalid Repository
  • 207 - Repository File Not Found
  • 208 - Invalid User
  • 209 - Repository Action Not Supported
  • 210 - Repository Information Error
  • 212 - Empty Changeset
  • 213 - Server Configuration Error
  • 214 - Bad Host Key
  • 215 - Unverified Host Key
  • 216 - Unverified Host Certificate
  • 217 - Missing User Key
  • 218 - Repository Authentication Error
  • 219 - Diff Empty
  • 220 - Diff Too Big
  • 221 - File Retrieval Error
  • 222 - Hosting Service Authentication Error
  • 223 - Group Already Exists
  • 224 - Diff Parse Error
  • 225 - Publish Error
  • 226 - User Query Error
  • 227 - Commit ID Already Exists
  • 228 - Token Generation Failed
  • 230 - Could not close review request
  • 231 - Could not reopen review request
  • 232 - Ship-It Revocation Error
  • REST API 2.0
  • Overview
  • Authenticating
  • API Token Policies
  • OAuth2 Authentication
  • Rich Text Fields and Types
  • Storing/Accessing Extra Data
  • Resources
  • Root List Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Extension List Resource
  • Extension Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Request List Resource
  • Review Request Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Root Review List Resource
  • Search Resource
  • Server Info Resource
  • Session Resource
  • User List Resource
  • User Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • Server Info Resource
  • Default Reviewer List Resource
  • Default Reviewer Resource
  • Default Reviewer Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • File Diff List Resource
  • Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • File Diff List Resource
  • File Diff Resource
  • Diff Commit List Resource
  • Diff Commit Resource
  • Diff Commit Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Diff File Attachment Resource
  • Original File Resource
  • Patched File Resource
  • Extension List Resource
  • Extension Resource
  • Extension Resource
  • Hosting Service List Resource
  • Hosting Service Resource
  • Hosting Service Resource
  • Hosting Service Account List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Hosting Service Account Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository List Resource
  • Remote Repository Resource
  • Remote Repository Resource
  • OAuth2 Applications List Resource
  • OAuth2 Applications Resource
  • OAuth2 Applications Resource
  • OAuth2 Tokens List Resource
  • OAuth2 Tokens Resource
  • OAuth2 Tokens Resource
  • Repository List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository Resource
  • Diff File Attachment List Resource
  • Diff File Attachment Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository Branches Resource
  • Repository Commits Resource
  • Repository Group List Resource
  • Repository Group Resource
  • Repository Group Resource
  • Repository Info Resource
  • Repository User List Resource
  • Repository User Resource
  • Repository User Resource
  • Review Group List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User List Resource
  • Review Group User Resource
  • Review Group User Resource
  • Change List Resource
  • Change Resource
  • Change Resource
  • File Attachment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Resource
  • File Attachment Comment List Resource
  • File Attachment Comment List Resource
  • File Diff List Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Resource
  • File Diff Comment List Resource
  • Original File Resource
  • Patched File Resource
  • File Diff Comment List Resource
  • Review Request List Resource
  • Review Request Resource
  • Change List Resource
  • Diff Context Resource
  • Diff List Resource
  • File Attachment List Resource
  • Review List Resource
  • Review Request Draft Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Status Update List Resource
  • Review Request Resource
  • Change List Resource
  • Change Resource
  • Diff Context Resource
  • Diff List Resource
  • Diff Resource
  • File Attachment List Resource
  • File Attachment Resource
  • Review List Resource
  • Review Resource
  • Review Draft Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft File Attachment List Resource
  • Draft Screenshot List Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Status Update List Resource
  • Status Update Resource
  • Review Request Last Update Resource
  • Screenshot List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Resource
  • Screenshot Comment List Resource
  • Screenshot Comment List Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft File Diff List Resource
  • Draft Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Diff Commit List Resource
  • Draft Diff Commit Resource
  • Draft Diff Commit Resource
  • Draft File Diff List Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Diff Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft File Attachment Resource
  • Draft Original File Resource
  • Draft Patched File Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Draft Screenshot Resource
  • Review Request Draft Resource
  • Draft Diff List Resource
  • Draft Diff Resource
  • Draft File Attachment List Resource
  • Draft File Attachment Resource
  • Draft Screenshot List Resource
  • Draft Screenshot Resource
  • Root Review List Resource
  • Root Diff Comment List Resource
  • Root File Attachment Comment List Resource
  • Root General Comment List Resource
  • Review List Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review File Attachment Comment List Resource
  • Review General Comment List Resource
  • Review Reply List Resource
  • Review Screenshot Comment List Resource
  • Review Draft Resource
  • Review Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Draft Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Draft Resource
  • Review Diff Comment List Resource
  • Review Diff Comment Resource
  • Review Diff Comment Resource
  • Review File Attachment Comment List Resource
  • Review File Attachment Comment Resource
  • Review File Attachment Comment Resource
  • Review General Comment List Resource
  • Review General Comment Resource
  • Review General Comment Resource
  • Review Screenshot Comment List Resource
  • Review Screenshot Comment Resource
  • Review Screenshot Comment Resource
  • Review Reply Draft Resource
  • Review Reply List Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply General Comment List Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Draft Resource
  • Review Reply Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Diff Comment List Resource
  • Review Reply Diff Comment Resource
  • Review Reply Diff Comment Resource
  • Review Reply File Attachment Comment List Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply File Attachment Comment Resource
  • Review Reply General Comment List Resource
  • Review Reply General Comment Resource
  • Review Reply General Comment Resource
  • Review Reply Screenshot Comment List Resource
  • Review Reply Screenshot Comment Resource
  • Review Reply Screenshot Comment Resource
  • Search Resource
  • Status Update List Resource
  • Status Update Resource
  • Status Update Resource
  • API Token List Resource
  • API Token Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • Muted Review Request Resource
  • Session Resource
  • User List Resource
  • User Resource
  • API Token List Resource
  • Archived Review Request List Resource
  • Muted Review Request List Resource
  • User File Attachment List Resource
  • Watched List Resource
  • User Resource
  • API Token List Resource
  • API Token Resource
  • Archived Review Request List Resource
  • Archived Review Request Resource
  • Muted Review Request List Resource
  • Muted Review Request Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Request List Resource
  • User File Attachment List Resource
  • User File Attachment Resource
  • User File Attachment Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Watched Review Request Resource
  • Watched List Resource
  • Watched Review Group List Resource
  • Watched Review Group Resource
  • Watched Review Request List Resource
  • Watched Review Request Resource
  • Validation List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • Validate Diff List Resource
  • Validate Diff Commit List Resource
  • WebHook List Resource
  • WebHook Resource
  • WebHook Resource
  • Errors
  • 100 - Does Not Exist
  • 101 - Permission Denied
  • 102 - Invalid Attribute
  • 103 - Not Logged In
  • 104 - Login Failed
  • 105 - Invalid Form Data
  • 106 - Missing Attribute
  • 107 - Enable Extension Failed
  • 108 - Disable Extension Failed
  • 109 - Extension Already Installed
  • 110 - Install Extension Failed
  • 111 - Duplicate Item
  • 112 - OAuth2 Missing Scope Error
  • 113 - OAuth2 Access Denied Error
  • 114 - Rate Limit Exceeded
  • 203 - Invalid Change Number
  • 204 - Change Number In Use
  • 205 - Missing Repository
  • 206 - Invalid Repository
  • 207 - Repository File Not Found
  • 208 - Invalid User
  • 209 - Repository Action Not Supported
  • 210 - Repository Information Error
  • 212 - Empty Changeset
  • 213 - Server Configuration Error
  • 214 - Bad Host Key
  • 215 - Unverified Host Key
  • 216 - Unverified Host Certificate
  • 217 - Missing User Key
  • 218 - Repository Authentication Error
  • 219 - Diff Empty
  • 220 - Diff Too Big
  • 221 - File Retrieval Error
  • 222 - Hosting Service Authentication Error
  • 223 - Group Already Exists
  • 224 - Diff Parse Error
  • 225 - Publish Error
  • 226 - User Query Error
  • 227 - Commit ID Already Exists
  • 228 - Token Generation Failed
  • 230 - Could not close review request
  • 231 - Could not reopen review request
  • 232 - Ship-It Revocation Error
  • Glossary
  • Extending Review Board
  • Extension Files/Package Layout
  • Creating an Extension Class
  • Extension Configuration
  • Database Models
  • Extension Static Media Files
  • JavaScript Extensions
  • Testing Extensions
  • Extension Distribution
  • Writing Review Board Extensions
  • The rbext Tool
  • Extension Hooks
  • AccountPageFormsHook
  • AccountPagesHook
  • Action Hooks
  • AdminWidgetHook
  • APIExtraDataAccessHook
  • AuthBackendHook
  • AvatarServiceHook
  • CommentDetailDisplayHook
  • DashboardColumnsHook
  • DashboardSidebarItemsHook
  • DataGridColumnsHook
  • EmailHook
  • ReviewRequestPublishedEmailHook
  • ReviewRequestClosedEmailHook
  • ReviewPublishedEmailHook
  • ReviewReplyPublishedEmailHook
  • FileAttachmentThumbnailHook
  • FileDiffACLHook
  • HostingServiceHook
  • IntegrationHook
  • NavigationBarHook
  • ReviewRequestApprovalHook
  • ReviewRequestFieldsHook
  • ReviewRequestFieldSetsHook
  • ReviewUIHook
  • SCMToolHook
  • SignalHook
  • TemplateHook
  • URLHook
  • UserInfoboxHook
  • UserPageSidebarItemsHook
  • WebAPICapabilitiesHook
  • JavaScript Extension Hooks
  • CommentDialogHook
  • FileAttachmentThumbnailContainerHook
  • ReviewDialogCommentHook
  • ReviewDialogHook
  • Adding Review Request Fields
  • Review UI Integration
  • Writing Authentication Backends
  • Writing Legacy Authentication Backends
  • Extending the Web API
  • Module and Class References
  • reviewboard
  • reviewboard.deprecation
  • reviewboard.rb_platform
  • reviewboard.signals
  • reviewboard.accounts.backends
  • reviewboard.accounts.backends.ad
  • reviewboard.accounts.backends.base
  • reviewboard.accounts.backends.http_digest
  • reviewboard.accounts.backends.ldap
  • reviewboard.accounts.backends.nis
  • reviewboard.accounts.backends.registry
  • reviewboard.accounts.backends.standard
  • reviewboard.accounts.backends.x509
  • reviewboard.accounts.decorators
  • reviewboard.accounts.errors
  • reviewboard.accounts.forms.auth
  • reviewboard.accounts.forms.pages
  • reviewboard.accounts.forms.registration
  • reviewboard.accounts.managers
  • reviewboard.accounts.middleware
  • reviewboard.accounts.mixins
  • reviewboard.accounts.models
  • reviewboard.accounts.pages
  • reviewboard.accounts.privacy
  • reviewboard.accounts.templatetags.accounts
  • reviewboard.accounts.testing
  • reviewboard.accounts.testing.queries
  • reviewboard.accounts.trophies
  • reviewboard.actions
  • reviewboard.actions.base
  • reviewboard.actions.errors
  • reviewboard.actions.registry
  • reviewboard.admin
  • reviewboard.admin.admin_sites
  • reviewboard.admin.cache_stats
  • reviewboard.admin.checks
  • reviewboard.admin.decorators
  • reviewboard.admin.form_widgets
  • reviewboard.admin.middleware
  • reviewboard.admin.model_admin
  • reviewboard.admin.security_checks
  • reviewboard.admin.server
  • reviewboard.admin.siteconfig
  • reviewboard.admin.support
  • reviewboard.admin.validation
  • reviewboard.admin.widgets
  • reviewboard.attachments.errors
  • reviewboard.attachments.forms
  • reviewboard.attachments.managers
  • reviewboard.attachments.mimetypes
  • reviewboard.attachments.models
  • reviewboard.avatars.registry
  • reviewboard.avatars.services
  • reviewboard.avatars.settings
  • reviewboard.avatars.templatetags.avatars
  • reviewboard.avatars.testcase
  • reviewboard.changedescs.models
  • reviewboard.datagrids.columns
  • reviewboard.datagrids.grids
  • reviewboard.datagrids.sidebar
  • reviewboard.diffviewer.chunk_generator
  • reviewboard.diffviewer.differ
  • reviewboard.diffviewer.diffutils
  • reviewboard.diffviewer.errors
  • reviewboard.diffviewer.forms
  • reviewboard.diffviewer.managers
  • reviewboard.diffviewer.models
  • reviewboard.diffviewer.models.diffcommit
  • reviewboard.diffviewer.models.diffset
  • reviewboard.diffviewer.models.diffset_history
  • reviewboard.diffviewer.models.filediff
  • reviewboard.diffviewer.models.legacy_file_diff_data
  • reviewboard.diffviewer.models.raw_file_diff_data
  • reviewboard.diffviewer.myersdiff
  • reviewboard.diffviewer.opcode_generator
  • reviewboard.diffviewer.parser
  • reviewboard.diffviewer.processors
  • reviewboard.diffviewer.renderers
  • reviewboard.diffviewer.smdiff
  • reviewboard.certs
  • reviewboard.certs.cert
  • reviewboard.certs.errors
  • reviewboard.extensions.base
  • reviewboard.extensions.hooks
  • reviewboard.extensions.packaging
  • reviewboard.extensions.packaging.backend
  • reviewboard.extensions.packaging.setuptools_backend
  • reviewboard.extensions.packaging.static_media
  • reviewboard.extensions.testing
  • reviewboard.extensions.testing.testcases
  • reviewboard.hostingsvcs.base
  • reviewboard.hostingsvcs.base.client
  • reviewboard.hostingsvcs.base.forms
  • reviewboard.hostingsvcs.base.hosting_service
  • reviewboard.hostingsvcs.base.http
  • reviewboard.hostingsvcs.base.paginator
  • reviewboard.hostingsvcs.base.registry
  • reviewboard.hostingsvcs.base.repository
  • reviewboard.hostingsvcs.errors
  • reviewboard.hostingsvcs.forms
  • reviewboard.hostingsvcs.hook_utils
  • reviewboard.hostingsvcs.models
  • reviewboard.hostingsvcs.repository
  • reviewboard.hostingsvcs.service
  • reviewboard.hostingsvcs.testing
  • reviewboard.hostingsvcs.testing.testcases
  • reviewboard.hostingsvcs.utils.paginator
  • reviewboard.integrations
  • reviewboard.integrations.base
  • reviewboard.integrations.forms
  • reviewboard.integrations.models
  • reviewboard.integrations.urls
  • reviewboard.integrations.views
  • reviewboard.notifications
  • reviewboard.notifications.email
  • reviewboard.notifications.email.backend
  • reviewboard.notifications.email.decorators
  • reviewboard.notifications.email.hooks
  • reviewboard.notifications.email.message
  • reviewboard.notifications.email.utils
  • reviewboard.notifications.email.views
  • reviewboard.notifications.forms
  • reviewboard.notifications.managers
  • reviewboard.notifications.models
  • reviewboard.notifications.webhooks
  • reviewboard.reviews.actions
  • reviewboard.reviews.builtin_fields
  • reviewboard.reviews.chunk_generators
  • reviewboard.reviews.conditions
  • reviewboard.reviews.context
  • reviewboard.reviews.default_actions
  • reviewboard.reviews.detail
  • reviewboard.reviews.errors
  • reviewboard.reviews.features
  • reviewboard.reviews.fields
  • reviewboard.reviews.forms
  • reviewboard.reviews.managers
  • reviewboard.reviews.markdown_utils
  • reviewboard.reviews.models
  • reviewboard.reviews.signals
  • reviewboard.reviews.templatetags.reviewtags
  • reviewboard.reviews.testing
  • reviewboard.reviews.testing.queries
  • reviewboard.reviews.testing.queries.review_groups
  • reviewboard.reviews.testing.queries.review_requests
  • reviewboard.reviews.testing.queries.reviews
  • reviewboard.reviews.ui.base
  • reviewboard.reviews.ui.image
  • reviewboard.reviews.ui.markdownui
  • reviewboard.reviews.ui.text
  • reviewboard.reviews.views.attachments
  • reviewboard.reviews.views.bug_trackers
  • reviewboard.reviews.views.diff_fragments
  • reviewboard.reviews.views.diffviewer
  • reviewboard.reviews.views.download_diff
  • reviewboard.reviews.views.email
  • reviewboard.reviews.views.mixins
  • reviewboard.reviews.views.new_review_request
  • reviewboard.reviews.views.review_request_detail
  • reviewboard.reviews.views.review_request_infobox
  • reviewboard.reviews.views.review_request_updates
  • reviewboard.reviews.views.root
  • reviewboard.scmtools.certs
  • reviewboard.scmtools.conditions
  • reviewboard.scmtools.core
  • reviewboard.scmtools.crypto_utils
  • reviewboard.scmtools.errors
  • reviewboard.scmtools.forms
  • reviewboard.scmtools.managers
  • reviewboard.scmtools.models
  • reviewboard.scmtools.signals
  • reviewboard.scmtools.testing
  • reviewboard.scmtools.testing.queries
  • reviewboard.scmtools.tests.testcases
  • reviewboard.search.fields
  • reviewboard.search.forms
  • reviewboard.search.indexes
  • reviewboard.search.search_backends.base
  • reviewboard.search.search_backends.elasticsearch
  • reviewboard.search.search_backends.registry
  • reviewboard.search.search_backends.whoosh
  • reviewboard.search.signal_processor
  • reviewboard.search.testing
  • reviewboard.site.conditions
  • reviewboard.site.context_processors
  • reviewboard.site.decorators
  • reviewboard.site.middleware
  • reviewboard.site.mixins
  • reviewboard.site.models
  • reviewboard.site.signals
  • reviewboard.site.templatetags.localsite
  • reviewboard.site.testing
  • reviewboard.site.testing.queries
  • reviewboard.site.urlresolvers
  • reviewboard.site.validation
  • reviewboard.ssh.client
  • reviewboard.ssh.errors
  • reviewboard.ssh.policy
  • reviewboard.ssh.storage
  • reviewboard.ssh.utils
  • reviewboard.testing.hosting_services
  • reviewboard.testing.queries
  • reviewboard.testing.queries.base
  • reviewboard.testing.queries.http
  • reviewboard.testing.scmtool
  • reviewboard.testing.testcase
  • reviewboard.themes
  • reviewboard.themes.context_processors
  • reviewboard.themes.ui
  • reviewboard.themes.ui.base
  • reviewboard.themes.ui.default
  • reviewboard.themes.ui.registry
  • reviewboard.webapi.auth_backends
  • reviewboard.webapi.base
  • reviewboard.webapi.decorators
  • reviewboard.webapi.errors
  • reviewboard.webapi.mixins
  • reviewboard.webapi.models
  • reviewboard.webapi.server_info
  • reviewboard.webapi.testing
  • reviewboard.webapi.testing.queries
  • reviewboard.webapi.tests.base
  • Frequently Asked Questions
  • General Index
  • Python Module Index
  • Release Notes
  • This documentation covers the in-development release of Review Board. You can see the stable Review Board documentation or all previous versions.

    reviewboard.hostingsvcs.base.hosting_service¶

    Base communication client support for hosting services.

    New in version 6.0: This replaces the hosting service code in the old reviewboard.hostingsvcs.service module.

    class HostingServicePlan[source]¶

    Bases: TypedDict

    Information on a hosting service plan.

    New in version 6.0.

    name: StrOrPromise¶

    The display name of the plan.

    This is required for all plans.

    Type:

    str

    bug_tracker_field: NotRequired[str]¶

    A templated value for the bug tracker field.

    The value will be filled in based on the cleaned bug tracker form data. It must take templated keys in the form of %(key_name)s.

    Type:

    str

    form: NotRequired[Type[BaseHostingServiceRepositoryForm]]¶

    Optional form used to configure repository settings.

    If not provided, a default form will be used.

    This value can also be set within repository_plans.

    Type:

    type

    repository_fields: NotRequired[SCMToRepositoryFields]¶

    Templated values to set for model repository fields.

    Each key corresponds to a SCMTool ID or name, and each value to a mapping of model attribute names to templates for values to populate based on cleaned repository form data. It must take templated keys in the form of %(key_name)s.

    Type:

    dict

    __annotations__ = {'bug_tracker_field': ForwardRef('NotRequired[str]', module='reviewboard.hostingsvcs.base.hosting_service'), 'form': ForwardRef('NotRequired[Type[BaseHostingServiceRepositoryForm]]', module='reviewboard.hostingsvcs.base.hosting_service'), 'name': ForwardRef('StrOrPromise', module='reviewboard.hostingsvcs.base.hosting_service'), 'repository_fields': ForwardRef('NotRequired[SCMToRepositoryFields]', module='reviewboard.hostingsvcs.base.hosting_service')}¶
    __closed__ = False¶
    __extra_items__ = None¶
    __mutable_keys__ = frozenset({'bug_tracker_field', 'form', 'name', 'repository_fields'})¶
    __optional_keys__ = frozenset({})¶
    __orig_bases__ = (<function TypedDict>,)¶
    __readonly_keys__ = frozenset({})¶
    __required_keys__ = frozenset({'bug_tracker_field', 'form', 'name', 'repository_fields'})¶
    __total__ = True¶
    HostingServiceCredentials¶

    Credentials used to authenticate with a hosting service.

    New in version 6.0.

    alias of Dict[str, Any]

    RepositoryFields¶

    Information on fields in a repository.

    These will map model or form attributes to values or templates for processing when saving a repository.

    New in version 6.0.

    alias of Dict[str, Any]

    SCMToRepositoryFields¶

    A mapping of SCMTool IDs to repository fields.

    New in version 6.0.

    alias of Mapping[str, Dict[str, Any]]

    class BaseHostingService(account: HostingServiceAccount)[source]¶

    Bases: object

    An interface to a hosting service for repositories and bug trackers.

    Subclasses are used to more easily configure repositories and to make use of third party APIs to perform special operations not otherwise usable by generic repositories.

    A hosting service can specify forms for authentication, repository, and bug tracker configuration.

    It can also provide a list of repository “plans” (such as public repositories, private repositories, or other types available to the hosting service), along with configuration specific to the plan. These plans will be available when configuring the repository.

    Changed in version 6.0:

    • Moved from reviewboard.hostingsvcs.service to reviewboard.hostingsvcs.base.hosting_service and renamed from HostingService to BaseHostingService.

    hosting_service_id: Optional[str] = None¶

    The unique ID of the hosting service.

    This should be lowercase, and only consist of the characters a-z, 0-9, _, and -.

    New in version 3.0.16: This should now be set on all custom hosting services. It will be required in Review Board 4.0.

    Type:

    str

    name: Optional[StrOrPromise] = None¶

    The display name for the hosting service.

    Type:

    str

    plans: Optional[Sequence[Tuple[str, HostingServicePlan]]] = None¶

    A list of available hosting service plans.

    Each plan may map to different configuration forms and saved state, helping subclasses support different APIs or data models provided by the server, and better helping users supply the information needed to configure the repository.

    Type:

    list

    supports_bug_trackers: bool = False¶

    Whether this service supports bug trackers.

    This should be set to True if the service provides its own bug tracker and the subclass implements all of the following methods:

    • get_bug_tracker_field()

    • get_bug_tracker_requires_username()

    Type:

    bool

    supports_post_commit: bool = False¶

    Whether this service supports post-commit requests.

    This should be set to True if the subclass implements all of the following methods:

    • get_branches()

    • get_change()

    • get_commits()

    Type:

    bool

    supports_repositories: bool = False¶

    Whether this service supports source code repositories.

    This should be set to True if the service provides a compatible source code repository and the subclass implements all of the following methods:

    • get_file()

    • get_file_exists()

    • get_repository_fields()

    Several other optional methods may also be defined and used if this is set.

    Type:

    bool

    supports_ssh_key_association: bool = False¶

    Whether this service supports automatic association of SSH keys.

    This should be set to True if the service provides any way of automatically assigning an SSH key for a user for repository access, and the subclass implements the following methods:

    • associate_ssh_key().

    • is_ssh_key_associated().

    Type:

    bool

    supports_two_factor_auth: bool = False¶

    Whether this service supports two-factor authentication.

    This should be set to True if the service supports two-factor authentication when communicating with the API and the service implements support in authorize().

    Type:

    bool

    supports_list_remote_repositories: bool = False¶

    Whether this service supports listing remote repositories.

    This should be set to True if the service supports looking up repositories via the API and the subclass implements all of the following methods:

    • get_remote_repositories()

    • get_remote_repository()

    Type:

    bool

    has_repository_hook_instructions: bool = False¶

    Whether this service provides repository hook instructions.

    This should be set to True if the subclass implements instructions’ on configuring useful repository hooks in the following method:

    • get_repository_hook_instructions()

    Type:

    bool

    visible: bool = True¶

    Whether this service should be shown as an available option.

    This should be set to False when a service is no longer available to use, and should be hidden from repository configuration. The implementation can then be largely stubbed out. Users will see a message in the repository configuration page.

    New in version 3.0.17.

    Type:

    bool

    self_hosted: bool = False¶

    Whether this service can be self-hosted.

    This should be set to True if the service can be hosted at a custom URL.

    Type:

    bool

    repository_url_patterns: Optional[List[_AnyURL]] = None¶

    Custom URL patterns to include for the hosting service.

    This can be used to create URLs for hooks or other utility purposes. These will be installed under:

    • /repos/<repository_id>/<hosting_service_id>/

    • /s/<local_site>/repos/<repository_id>/<hosting_service_id>/

    Type:

    list

    client_class¶

    The utility class used to perform client functionality.

    Client classes are responsible for communicating with the hosting service at an API level. Instance of this hosting service will receive a client instance.

    Subclasses should set this to a subclass of HostingServiceClient.

    Type:

    type

    alias of HostingServiceClient

    auth_form: Optional[Type[BaseHostingServiceAuthForm]] = None¶

    Optional form used to configure authentication settings for an account.

    If not provided, a default form will be used.

    Type:

    type

    needs_authorization: bool = False¶

    Whether usage of this hosting service requires authorization.

    This value can also be set within repository_plans.

    Type:

    bool

    form: Optional[Type[BaseHostingServiceRepositoryForm]] = None¶

    Optional form used to configure repository settings.

    If not provided, a default form will be used.

    This value can also be set within repository_plans.

    Type:

    type

    repository_fields: SCMToRepositoryFields = {}¶

    Templated values to set for model repository fields.

    Each key corresponds to a SCMTool ID or name, and each value to a mapping of model attribute names to templates for values to populate based on cleaned repository form data. It must take templated keys in the form of %(key_name)s.

    Type:

    dict

    bug_tracker_field: Optional[str] = None¶

    A templated value for the bug tracker field.

    The value will be filled in based on the cleaned bug tracker form data. It must take templated keys in the form of %(key_name)s.

    Type:

    str

    supported_scmtools: List[str] = []¶

    A list of SCMTools IDs or names that are supported by this service.

    This should contain a list of SCMTool IDs that this service can work with. For backwards-compatibility, it may instead contain a list of SCMTool names (corresponding to database registration names).

    This may also be specified per-plan in the plans.

    Changed in version 3.0.16: Added support for SCMTool IDs. A future version will deprecate using SCMTool names here.

    Type:

    list of str

    visible_scmtools: Optional[List[str]] = None¶

    A list of SCMTool IDs that are visible when configuring the service.

    This should contain a list of SCMTool IDs that this service will show when configuring a repository. It can be used to offer continued legacy support for an SCMTool without offering it when creating new repositories. If not specified, all SCMTools listed in supported_scmtools are assumed to be visible.

    If explicitly set, this should always be equal to or a subset of supported_scmtools.

    This may also be specified per-plan in the plans.

    New in version 3.0.17.

    Type:

    list of str

    __init__(account: HostingServiceAccount) → None[source]¶

    Initialize the hosting service.

    Parameters:

    account (reviewboard.hostingsvcs.models.HostingServiceAccount) – The account to use with the service.

    client: HostingServiceClient¶

    The client instance for talking to the hosting service.

    Type:

    HostingServiceClient

    is_authorized() → bool[source]¶

    Return whether or not the account is currently authorized.

    An account may no longer be authorized if the hosting service switches to a new API that doesn’t match the current authorization records. This function will determine whether the account is still considered authorized.

    Returns:

    Whether or not the associated account is authorized.

    Return type:

    bool

    get_password() → Optional[str][source]¶

    Return the raw password for this hosting service.

    Not all hosting services provide this, and not all would need it. It’s primarily used when building a Subversion client, or other SCMTools that still need direct access to the repository itself.

    Returns:

    The password.

    Return type:

    str

    is_ssh_key_associated(repository: Repository, key: PKey) → bool[source]¶

    Return whether or not the key is associated with the repository.

    If the given key is present amongst the hosting service’s deploy keys for the given repository, then it is considered to be associated.

    Subclasses should implement this when the hosting service supports SSH key association.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository the key must be associated with.

    • key (paramiko.PKey) – The key to check for association.

    Returns:

    Whether or not the key is associated with the repository.

    Return type:

    bool

    Raises:

    reviewboard.hostingsvcs.errors.SSHKeyAssociationError – If an error occurred during communication with the hosting service.

    associate_ssh_key(repository: Repository, key: PKey) → None[source]¶

    Associate an SSH key with a given repository.

    Subclasses should implement this when the hosting service supports SSH key association.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository to associate the key with.

    • key (paramiko.PKey) – The key to add to the repository’s list of deploy keys.

    Raises:

    reviewboard.hostingsvcs.errors.SSHKeyAssociationError – If an error occurred during key association.

    authorize(username: Optional[str], password: Optional[str], hosting_url: Optional[str], credentials: Dict[str, Any], two_factor_auth_code: Optional[str] = None, local_site_name: Optional[str] = None, *args, **kwargs) → None[source]¶

    Authorize an account for the hosting service.

    Parameters:
    • username (str) – The username for the account.

    • password (str) – The password for the account.

    • hosting_url (str) – The hosting URL for the service, if self-hosted.

    • credentials (dict) –

      All credentials provided by the authentication form.

      This will contain the username, password, and anything else provided by that form.

    • two_factor_auth_code (str, optional) – The two-factor authentication code provided by the user.

    • local_site_name (str, optional) – The Local Site name, if any, that the account should be bound to.

    • *args (tuple) – Extra unused positional arguments.

    • **kwargs (dict) – Extra keyword arguments containing values from the repository’s configuration.

    Raises:
    • reviewboard.hostingsvcs.errors.AuthorizationError – The credentials provided were not valid.

    • reviewboard.hostingsvcs.errors.TwoFactorAuthCodeRequiredError – A two-factor authentication code is required to authorize this account. The request must be retried with the same credentials and with the two_factor_auth_code parameter provided.

    check_repository(path: str, username: Optional[str], password: Optional[str], scmtool_class: Type[SCMTool], local_site_name: Optional[str], *args, **kwargs) → None[source]¶

    Checks the validity of a repository configuration.

    This performs a check against the hosting service or repository to ensure that the information provided by the user represents a valid repository.

    This is passed in the repository details, such as the path and raw credentials, as well as the SCMTool class being used, the LocalSite’s name (if any), and all field data from the HostingServiceForm as keyword arguments.

    Parameters:
    • path (str) – The repository URL.

    • username (str) – The username to use.

    • password (str) – The password to use.

    • scmtool_class (type) – The subclass of SCMTool that should be used.

    • local_site_name (unicode) – The name of the local site associated with the repository, or None.

    • *args (tuple) – Additional positional arguments, unique to each hosting service.

    • **kwargs (dict) – Additional keyword arguments, unique to each hosting service.

    Raises:

    reviewboard.hostingsvcs.errors.RepositoryError – The repository is not valid.

    get_file(repository: Repository, path: str, revision: str, *args, **kwargs) → bytes[source]¶

    Return the requested file.

    Files can only be returned from hosting services that support repositories.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository to retrieve the file from.

    • path (str) – The file path.

    • revision (str) – The revision the file should be retrieved from.

    • *args (tuple) – Ignored positional arguments.

    • **kwargs (dict) – Additional keyword arguments to pass to the SCMTool.

    Returns:

    The contents of the file.

    Return type:

    bytes

    Raises:

    NotImplementedError – If this hosting service does not support repositories.

    get_file_exists(repository: Repository, path: str, revision: str, *args, **kwargs) → bool[source]¶

    Return whether or not the given path exists in the repository.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository to check for file existence.

    • path (str) – The file path.

    • revision (str) – The revision to check for file existence.

    • *args (tuple) – Ignored positional arguments.

    • **kwargs (dict) – Additional keyword arguments to be passed to the SCMTool.

    Returns:

    Whether or not the file exists at the given revision in the repository.

    Return type:

    bool

    Raises:

    NotImplementedError – If this hosting service does not support repositories.

    get_branches(repository: Repository) → Sequence[Branch][source]¶

    Return a list of all branches in the repositories.

    This should be implemented by subclasses, and is expected to return a list of Branch objects. One (and only one) of those objects should have the “default” field set to True.

    Parameters:

    repository (reviewboard.scmtools.models.Repository) – The repository for which branches should be returned.

    Returns:

    The branches.

    Return type:

    list of reviewboard.scmtools.core.Branch

    Raises:

    reviewboard.hostingsvcs.errors.HostingServiceError – There was an error fetching branches.

    get_commits(repository: Repository, branch: Optional[str] = None, start: Optional[str] = None) → Sequence[Commit][source]¶

    Return a list of commits backward in history from a given point.

    This should be implemented by subclasses, and is expected to return a list of Commit objects (usually 30, but this is flexible depending on the limitations of the APIs provided.

    This can be called multiple times in succession using the “parent” field of the last entry as the start parameter in order to paginate through the history of commits in the repository.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository to retrieve commits from.

    • branch (str, optional) –

      The branch to retrieve from.

      If this is not provided, the default branch will be used.

    • start (str, optional) –

      An optional starting revision.

      If this is not provided, the most recent commits will be returned.

    Returns:

    The retrieved commits.

    Return type:

    list of reviewboard.scmtools.core.Commit

    Raises:

    reviewboard.hostingsvcs.errors.HostingServiceError – There was an error fetching commits.

    get_change(repository: Repository, revision: str) → Commit[source]¶

    Return an individual change.

    This method should be implemented by subclasses.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository to get the change from.

    • revision (str) – The revision to retrieve.

    Returns:

    The change.

    Return type:

    reviewboard.scmtools.core.Commit

    Raises:

    reviewboard.hostingsvcs.errors.HostingServiceError – There was an error fetching the commit.

    get_remote_repositories(owner: Optional[str] = None, owner_type: Optional[str] = None, filter_type: Optional[str] = None, start: Optional[int] = None, per_page: Optional[int] = None, **kwargs) → APIPaginator[source]¶

    Return a list of remote repositories for the owner.

    This method should be implemented by subclasses.

    Parameters:
    • owner (str, optional) –

      The owner of the repositories.

      This is usually a username.

    • owner_type (str, optional) – A hosting service-specific indicator of what the owner is (such as a user or a group).

    • filter_type (str, optional) – Some hosting service-specific criteria to filter by.

    • start (int, optional) – The index to start at.

    • per_page (int, optional) – The number of results per page.

    Returns:

    A paginator for the returned repositories.

    Return type:

    reviewboard.hostingsvcs.utils.APIPaginator

    get_remote_repository(repository_id: str) → RemoteRepository[source]¶

    Return the remote repository for the ID.

    This method should be implemented by subclasses.

    Parameters:

    repository_id (str) –

    The repository’s identifier.

    This is unique to each hosting service.

    Returns:

    The remote repository.

    Return type:

    reviewboard.hostingsvcs.repository.RemoteRepository

    Raises:

    django.core.excptions.ObjectDoesNotExist – If the remote repository does not exist.

    normalize_patch(repository: Repository, patch: bytes, filename: str, revision: str) → bytes[source]¶

    Normalize a diff/patch file before it’s applied.

    This can be used to take an uploaded diff file and modify it so that it can be properly applied. This may, for instance, uncollapse keywords or remove metadata that would confuse patch.

    By default, this passes along the normalization to the repository’s SCMTool.

    Parameters:
    • repository (reviewboard.scmtools.models.Repository) – The repository the patch is meant to apply to.

    • patch (bytes) – The diff/patch file to normalize.

    • filename (str) – The name of the file being changed in the diff.

    • revision (str) – The revision of the file being changed in the diff.

    Returns:

    The resulting diff/patch file.

    Return type:

    bytes

    classmethod get_repository_fields(username: str, hosting_url: Optional[str], plan: str, tool_name: str, field_vars: Dict[str, str]) → Dict[str, Any][source]¶

    Return the repository fields based on the given plan and tool.

    If the plan argument is specified, that will be used to fill in some tool-specific field values. Otherwise they will be retrieved from the HostingService’s defaults.

    Parameters:
    • username (str) – The username.

    • hosting_url (str) – The URL of the repository.

    • plan (str) – The name of the plan.

    • tool_name (str) – The name of the SCMTool.

    • field_vars (dict) – The field values from the hosting service form.

    Returns:

    The filled in repository fields.

    Return type:

    dict

    Raises:

    KeyError – The provided plan is not valid for the hosting service.

    get_repository_hook_instructions(request: HttpRequest, repository: Repository) → SafeString[source]¶

    Return instructions for setting up incoming webhooks.

    Subclasses can override this (and set has_repository_hook_instructions = True on the subclass) to provide instructions that administrators can see when trying to configure an incoming webhook for the hosting service.

    Parameters:
    • request (django.http.HttpRequest) – The current HTTP request.

    • repository (reviewboard.scmtools.models.Repository) – The repository for webhook setup instructions.

    Returns:

    Rendered and escaped HTML for displaying to the user.

    Return type:

    django.utils.text.SafeString

    classmethod get_bug_tracker_requires_username(plan: Optional[str] = None) → bool[source]¶

    Return whether or not the bug tracker requires usernames.

    Parameters:

    plan (str, optional) – The name of the plan associated with the account.

    Returns:

    True if a username is required. False if it is not.

    Return type:

    bool

    Raises:

    NotImplementedError – If the hosting service does not support bug tracking.

    classmethod get_bug_tracker_field(plan: str, field_vars: Dict[str, str]) → str[source]¶

    Return the bug tracker field for the given plan.

    Parameters:
    • plan (str) – The name of the plan associated with the account.

    • field_vars (dict) – The field values from the hosting service form.

    Returns:

    The value of the bug tracker field.

    Return type:

    str

    Raises
    KeyError:

    The provided plan is not valid for the hosting service.

    __annotations__ = {'auth_form': 'Optional[Type[BaseHostingServiceAuthForm]]', 'bug_tracker_field': 'Optional[str]', 'client': 'HostingServiceClient', 'client_class': 'Type[HostingServiceClient]', 'form': 'Optional[Type[BaseHostingServiceRepositoryForm]]', 'has_repository_hook_instructions': 'bool', 'hosting_service_id': 'Optional[str]', 'name': 'Optional[StrOrPromise]', 'needs_authorization': 'bool', 'plans': 'Optional[Sequence[Tuple[str, HostingServicePlan]]]', 'repository_fields': 'SCMToRepositoryFields', 'repository_url_patterns': 'Optional[List[_AnyURL]]', 'self_hosted': 'bool', 'supported_scmtools': 'List[str]', 'supports_bug_trackers': 'bool', 'supports_list_remote_repositories': 'bool', 'supports_post_commit': 'bool', 'supports_repositories': 'bool', 'supports_ssh_key_association': 'bool', 'supports_two_factor_auth': 'bool', 'visible': 'bool', 'visible_scmtools': 'Optional[List[str]]'}¶
    classmethod get_field(plan: str, name: str, default: Optional[str] = None) → Any[source]¶

    Return the value of the field for the given plan.

    If plan is not None, the field will be looked up in the plan configuration for the service. Otherwise the hosting service’s default value will be used.

    Parameters:
    • plan (str) – The plan name.

    • name (str) – The field name.

    • default (str, optional) – A default value if the field is not present.

    Returns:

    The field value.

    Return type:

    str

    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]
    • HostingServicePlan
      • HostingServicePlan.name
      • HostingServicePlan.bug_tracker_field
      • HostingServicePlan.form
      • HostingServicePlan.repository_fields
      • HostingServicePlan.__annotations__
      • HostingServicePlan.__closed__
      • HostingServicePlan.__extra_items__
      • HostingServicePlan.__mutable_keys__
      • HostingServicePlan.__optional_keys__
      • HostingServicePlan.__orig_bases__
      • HostingServicePlan.__readonly_keys__
      • HostingServicePlan.__required_keys__
      • HostingServicePlan.__total__
    • HostingServiceCredentials
    • RepositoryFields
    • SCMToRepositoryFields
    • BaseHostingService
      • BaseHostingService.hosting_service_id
      • BaseHostingService.name
      • BaseHostingService.plans
      • BaseHostingService.supports_bug_trackers
      • BaseHostingService.supports_post_commit
      • BaseHostingService.supports_repositories
      • BaseHostingService.supports_ssh_key_association
      • BaseHostingService.supports_two_factor_auth
      • BaseHostingService.supports_list_remote_repositories
      • BaseHostingService.has_repository_hook_instructions
      • BaseHostingService.visible
      • BaseHostingService.self_hosted
      • BaseHostingService.repository_url_patterns
      • BaseHostingService.client_class
      • BaseHostingService.auth_form
      • BaseHostingService.needs_authorization
      • BaseHostingService.form
      • BaseHostingService.repository_fields
      • BaseHostingService.bug_tracker_field
      • BaseHostingService.supported_scmtools
      • BaseHostingService.visible_scmtools
      • BaseHostingService.__init__()
      • BaseHostingService.client
      • BaseHostingService.is_authorized()
      • BaseHostingService.get_password()
      • BaseHostingService.is_ssh_key_associated()
      • BaseHostingService.associate_ssh_key()
      • BaseHostingService.authorize()
      • BaseHostingService.check_repository()
      • BaseHostingService.get_file()
      • BaseHostingService.get_file_exists()
      • BaseHostingService.get_branches()
      • BaseHostingService.get_commits()
      • BaseHostingService.get_change()
      • BaseHostingService.get_remote_repositories()
      • BaseHostingService.get_remote_repository()
      • BaseHostingService.normalize_patch()
      • BaseHostingService.get_repository_fields()
      • BaseHostingService.get_repository_hook_instructions()
      • BaseHostingService.get_bug_tracker_requires_username()
      • BaseHostingService.get_bug_tracker_field()
      • BaseHostingService.__annotations__
      • BaseHostingService.get_field()