// SonarQube, open source software quality management tool. // Copyright (C) 2008-2016 SonarSource // mailto:contact AT sonarsource DOT com // // SonarQube is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either // version 3 of the License, or (at your option) any later version. // // SonarQube is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program; if not, write to the Free Software Foundation, // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. syntax = "proto2"; package sonarqube.ws.issues; import "ws-commons.proto"; option java_package = "org.sonarqube.ws"; option java_outer_classname = "Issues"; option optimize_for = SPEED; // Response of GET api/issues/search message SearchWsResponse { optional int64 total = 1; optional int64 p = 2; optional int32 ps = 3; optional sonarqube.ws.commons.Paging paging = 4; // Total amount of effort, only when the facet "total" is enabled optional int64 effortTotal = 13; // Deprecated since 5.5, replaced by effortTotal optional int64 debtTotal = 5; repeated Issue issues = 6; repeated Component components = 7; optional sonarqube.ws.commons.Rules rules = 8; optional Users users = 9; // Deprecated since 5.5, action plan has been removed optional ActionPlans unusedActionPlans = 10; optional Languages languages = 11; optional sonarqube.ws.commons.Facets facets = 12; } message Operation { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message AddCommentResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message AssignResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message DeleteCommentResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message DoTransitionResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message SetSeverityResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message SetTagsResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message SetTypeResponse { optional Issue issue = 1; repeated Component components = 2; repeated sonarqube.ws.commons.Rule rules = 3; repeated Users.User users = 4; } message TagsResponse { repeated string tags = 1; } message Issue { optional string key = 1; optional string rule = 2; optional sonarqube.ws.commons.Severity severity = 3; optional string component = 4; optional int64 unusedComponentId = 5; optional string project = 6; optional string subProject = 7; optional int32 line = 8; optional string hash = 31; optional sonarqube.ws.commons.TextRange textRange = 9; repeated Flow flows = 10; optional string resolution = 11; optional string status = 12; optional string message = 13; optional string effort = 28; // Deprecated since 5.5, replaced by effort optional string debt = 14; optional string assignee = 15; // Unused since 5.5, manual issues feature has been removed optional string unusedReporter = 16; // SCM login of the committer who introduced the issue optional string author = 17; // Deprecated since 5.5, action plan has been removed optional string actionPlan = 18; repeated string tags = 19; // the transitions allowed for the requesting user. optional Transitions transitions = 20; // the actions allowed for the requesting user. optional Actions actions = 21; optional Comments comments = 22; optional string creationDate = 23; optional string updateDate = 24; optional string fUpdateAge = 25; optional string closeDate = 26; optional sonarqube.ws.commons.RuleType type = 27; optional string organization = 29; optional string branch = 30; optional string pullRequest = 32; optional string externalRuleEngine = 33; optional bool fromHotspot = 34; } message Transitions { repeated string transitions = 1; } message Actions { repeated string actions = 1; } message Flow { repeated Location locations = 1; } message Location { optional string component = 4; optional string unusedComponentId = 1; // Only when component is a file. Can be empty for a file if this is an issue global to the file. optional sonarqube.ws.commons.TextRange textRange = 2; optional string msg = 3; } message Comment { optional string key = 1; optional string login = 2; // TODO drop, it's already in field "users" optional string email = 3; // TODO drop, it's already in field "users" optional string userName = 4; optional string htmlText = 5; // TODO rename markdownText ? optional string markdown = 6; optional bool updatable = 7; optional string createdAt = 8; } message Comments { repeated Comment comments = 1; } // Deprecated since 5.5 message ActionPlan { optional string key = 1; optional string name = 2; // TODO define enum optional string status = 3; optional string deadLine = 4; // TODO to be renamed, is it id or key ? optional string project = 5; } // Deprecated since 5.5 message ActionPlans { repeated ActionPlan actionPlans = 1; } message Language { optional string key = 1; optional string name = 2; } message Languages { repeated Language languages = 1; } message Component { optional string organization = 11; optional int64 deprecatedId = 1; optional string key = 2; optional string uuid = 3; optional bool enabled = 4; optional string qualifier = 5; optional string name = 6; optional string longName = 7; optional string path = 8; optional int64 unusedProjectId = 9; optional int64 unusedSubProjectId = 10; optional string branch = 12; optional string pullRequest = 13; } // Response of GET api/issues/changelog message ChangelogWsResponse { repeated Changelog changelog = 1; message Changelog { optional string user = 1; optional string userName = 2; // Email is no more returned since 6.3 optional string deprecatedEmail = 3; optional string creationDate = 4; repeated Diff diffs = 5; optional string avatar = 6; message Diff { optional string key = 1; optional string newValue = 2; optional string oldValue = 3; } } } // Response of POST api/issues/bulk_change message BulkChangeWsResponse { optional int64 total = 1; optional int64 success = 2; optional int64 ignored = 3; optional int64 failures = 4; } message Users { repeated User users = 1; message User { optional string login = 1; optional string name = 2; optional string avatar = 3; optional bool active = 4; } } // Response of GET api/issues/authors message AuthorsResponse { repeated string authors = 1; }