-
-
Notifications
You must be signed in to change notification settings - Fork 520
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sonarqube has removed the use of the same external component key and differing database IDs for different branches on the same projects and now use different IDs in all cases. The pull request web service endpoints have also been removed from community edition. To allow the plugin to work with the new version of Sonarqube, the component key generation for branches has been modified to save branch DTOs whenever a new branch is created, and to remove the conditions around re-using the same branch if the target branch details matched an existing branch. The Pull Request endpoint actions have been copied from the old community edition sources, and tidied up to use a cleaner abstraction model. As the front-end only shows branch features if the implementation of `BranchFeatureExtension` returns the name 'branch-support', the `CommunityBranchFeatureExtension` has been altered to follow this requirement, and an additional `MonoRepoFeature` has been implemented to allow the mono-repo switches to be shown against the front-end. Includes the migration of any altered unit tests to JUnit 5.
- Loading branch information
Showing
43 changed files
with
1,390 additions
and
572 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/java/com/github/mc1arke/sonarqube/plugin/server/MonoRepoFeature.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (C) 2022 Michael Clarke | ||
* | ||
* This program 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. | ||
* | ||
* This program 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. | ||
* | ||
*/ | ||
package com.github.mc1arke.sonarqube.plugin.server; | ||
|
||
import org.sonar.api.ce.ComputeEngineSide; | ||
import org.sonar.api.server.ServerSide; | ||
import org.sonar.server.feature.SonarQubeFeature; | ||
|
||
@ServerSide | ||
@ComputeEngineSide | ||
public class MonoRepoFeature implements SonarQubeFeature { | ||
|
||
@Override | ||
public String getName() { | ||
return "monorepo"; | ||
} | ||
|
||
@Override | ||
public boolean isEnabled() { | ||
return true; | ||
} | ||
} |
Oops, something went wrong.