aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2018-02-01 15:30:48 +0100
committerTeryk Bellahsene <teryk@users.noreply.github.com>2018-03-13 14:05:36 +0100
commit751e4000e40a4af66b80767d632b1bef64dc5647 (patch)
tree0bf9735c29f6bae50ec10c11d8fbf7e50e909722 /sonar-core
parent23e4b51cde3ed0dc76ca1d73aa6cc31715dd25d4 (diff)
downloadsonarqube-751e4000e40a4af66b80767d632b1bef64dc5647.tar.gz
sonarqube-751e4000e40a4af66b80767d632b1bef64dc5647.zip
MMF-1134 Make pull request a 1st class citizen
SONAR-10366 Add pull request object to api/project_branches/list and api/ce/activity SONAR-10365 Analyze pull requests as 1st class citizen SONAR-10366 SONAR-10367 Create WS api/projet_pull_requests/list and delete SONAR-10383 Add Pull Request information when listing CE tasks SONAR-10365 Add key type in PROJECT_BRANCHES (#3063) SONAR-10371 Add pullRequest parameter in the Web API (#3076) * ComponentFinder searches by branch or pull request * Add pullRequest parameter to WS api/issues/* WS * Add pullRequest parameter to api/settings/* WS * Add pullRequest parameter to api/badges/* WS * Add pullRequest parameter to api/components/* WS * Add pullRequest parameter to api/sources/* WS SONAR-10368 Copy issue states from pull request after it's merged SONAR-10373 Send notifications for events on issues of a pull request SONAR-10365 Add pull_request_binary column in project_branches (#3073) SONAR-10433 Store pull request in projects table SONAR-10371 Add pullRequest field in the Web API SONAR-10365 Analyze pull requests as 1st class citizen BRANCH-45 Expose issue resolution for PR decoration BRANCH-49 Basic support of pull request analysis on pull request branch BRANCH-47 Fail when user tries to analyze a pull request and the plugin is not available SONAR-10366 update pull request decorated links to project and issues SONAR-10365 Use pull request id as key instead of branch name SONAR-10454 Update embedded Git 1.4 and SVN 1.7 SONAR-10365 rename sonar.pullrequest.id to sonar.pullrequest.key SONAR-10383 api/navigation/component returns the pull request key
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java23
-rw-r--r--sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java2
2 files changed, 21 insertions, 4 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java
index 1cc3bddeef5..a9c3088f6fb 100644
--- a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java
+++ b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java
@@ -31,9 +31,14 @@ public class ScannerProperties {
public static final String BRANCHES_DOC_LINK = "https://redirect.sonarsource.com/doc/branches.html";
+ public static final String ORGANIZATION = "sonar.organization";
+
public static final String BRANCH_NAME = "sonar.branch.name";
public static final String BRANCH_TARGET = "sonar.branch.target";
- public static final String ORGANIZATION = "sonar.organization";
+
+ public static final String PULL_REQUEST_KEY = "sonar.pullrequest.key";
+ public static final String PULL_REQUEST_BRANCH = "sonar.pullrequest.branch";
+ public static final String PULL_REQUEST_BASE = "sonar.pullrequest.base";
public static final String LINKS_SOURCES_DEV = "sonar.links.scm_dev";
@@ -70,8 +75,20 @@ public class ScannerProperties {
PropertyDefinition.builder(BRANCH_TARGET)
.name("Optional name of target branch to merge into")
.description(
- "Defines what is the target branch of the branch being analyzed. The main branch cannot have a target. "
- + "If no target is defined for other branches, the main branch is used as a target.")
+ "Defines the target branch of the branch being analyzed. The main branch cannot have a target. "
+ + "If no target is defined, the main branch is used as the target.")
+ .hidden()
+ .build(),
+ PropertyDefinition.builder(PULL_REQUEST_BRANCH)
+ .name("Optional name of pull request")
+ .description("Provide a name for the pull request being analyzed. It might match an existing pull request of the project, otherwise a new pull request will be created.")
+ .hidden()
+ .build(),
+ PropertyDefinition.builder(PULL_REQUEST_BASE)
+ .name("Optional name of target branch to merge into")
+ .description(
+ "Defines the target branch of the pull request being analyzed. "
+ + "If no target is defined, the main branch is used as the target.")
.hidden()
.build());
}
diff --git a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
index a3cfb1e2bc5..b3054a31a22 100644
--- a/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
+++ b/sonar-core/src/test/java/org/sonar/core/config/CorePropertyDefinitionsTest.java
@@ -30,7 +30,7 @@ public class CorePropertyDefinitionsTest {
@Test
public void all() {
List<PropertyDefinition> defs = CorePropertyDefinitions.all();
- assertThat(defs).hasSize(57);
+ assertThat(defs).hasSize(59);
}
@Test