diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 0000000..41a316f
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,14 @@
+# Changelog
+All notable changes to this project will be documented in this file.
+
+## [2.0.0] - 2018-04-17
+### Added
+- Support for SonarQube 7.1
+
+## [1.0.1] - 2018-04-17
+### Changed
+- Improved initial scan detection. It will accept `sonar.branch.name=master` during the initial scan
+
+## [1.0.0] - 2018-04-16
+### Added
+- Initial implementation for SonarQube 6.7+ and 7.0
diff --git a/README.md b/README.md
index 7710b5c..f110807 100644
--- a/README.md
+++ b/README.md
@@ -15,4 +15,7 @@ Drop plugin jar file in SonarQube `/extensions/plugins` directory and restart th
## Compatibility
-The plugin is compatible with SonarQube `6.7+ (LTS)` and `7.0`.
+| Plugin Version | Compatible SonarQube |
+| ------------- | -------------------- |
+| 1.x.x | 6.7+, 7.0 |
+| 2.0.0 | 7.1 |
diff --git a/pom.xml b/pom.xml
index 5ec4517..ae9fd3f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
org.sonarsource
branch
- 1.0.1
+ 2.0.0
Branch Plugin for SonarQube Community Edition
sonar-plugin
@@ -16,7 +16,7 @@
1.8
1.8
- 6.7
+ 7.1
Branch Plugin Community Edition
org.sonarsource.branch.BranchPlugin
diff --git a/src/main/java/org/sonarsource/branch/computeengine/BranchImpl.java b/src/main/java/org/sonarsource/branch/computeengine/BranchImpl.java
index 173c31b..45ac9d1 100644
--- a/src/main/java/org/sonarsource/branch/computeengine/BranchImpl.java
+++ b/src/main/java/org/sonarsource/branch/computeengine/BranchImpl.java
@@ -62,4 +62,10 @@ public String generateKey(Component module, @Nullable Component component) {
: ComponentKeys.createEffectiveKey(module.getKey(), StringUtils.trimToNull(component.getPath()));
return main ? mainBranchKey : mainBranchKey + ComponentDto.BRANCH_KEY_SEPARATOR + branchName;
}
+
+ // Not supported by the plugin
+ @Override
+ public String getPullRequestId() {
+ return null;
+ }
}
diff --git a/src/main/java/org/sonarsource/branch/computeengine/BranchLoaderDelegateImpl.java b/src/main/java/org/sonarsource/branch/computeengine/BranchLoaderDelegateImpl.java
index 92891a7..8a2924f 100644
--- a/src/main/java/org/sonarsource/branch/computeengine/BranchLoaderDelegateImpl.java
+++ b/src/main/java/org/sonarsource/branch/computeengine/BranchLoaderDelegateImpl.java
@@ -74,7 +74,7 @@ private Optional loadMainBranchByProjectUuid(String projectUuid) {
private Optional loadBranchByKey(String projectUuid, String key) {
try (DbSession dbSession = dbClient.openSession(false)) {
- return dbClient.branchDao().selectByKey(dbSession, projectUuid, key);
+ return dbClient.branchDao().selectByBranchKey(dbSession, projectUuid, key);
}
}
}
diff --git a/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationImpl.java b/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationImpl.java
index cd0f161..99d6f21 100644
--- a/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationImpl.java
+++ b/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationImpl.java
@@ -38,4 +38,10 @@ public String branchTarget() {
public String branchBase() {
return branchBase;
}
+
+ // Not supported by the plugin
+ @Override
+ public String pullRequestKey() {
+ return null;
+ }
}
diff --git a/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationLoaderImpl.java b/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationLoaderImpl.java
index 2ee9755..bcf69d0 100644
--- a/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationLoaderImpl.java
+++ b/src/main/java/org/sonarsource/branch/scanner/BranchConfigurationLoaderImpl.java
@@ -14,6 +14,7 @@
import org.sonar.scanner.scan.branch.BranchType;
import org.sonar.scanner.scan.branch.DefaultBranchConfiguration;
import org.sonar.scanner.scan.branch.ProjectBranches;
+import org.sonar.scanner.scan.branch.ProjectPullRequests;
import org.sonarsource.branch.PropertyDefinitions;
/**
@@ -23,7 +24,7 @@ public class BranchConfigurationLoaderImpl implements BranchConfigurationLoader
private static final Logger LOGGER = Loggers.get(BranchConfigurationLoaderImpl.class);
@Override
- public BranchConfiguration load(Map localSettings, Supplier