-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add Bitbucket type checking for
scm/
stripping (#84)
- Loading branch information
Showing
7 changed files
with
101 additions
and
39 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
52 changes: 52 additions & 0 deletions
52
src/main/java/io/moderne/organizations/ScmConfiguration.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,52 @@ | ||
package io.moderne.organizations; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
import java.util.List; | ||
|
||
@ConfigurationProperties(prefix = "moderne.scm") | ||
public class ScmConfiguration { | ||
private List<ScmRepository> repositories; | ||
private boolean allowMissingScmOrigins; | ||
|
||
public static class ScmRepository { | ||
String origin; | ||
Type type; | ||
|
||
public String getOrigin() { | ||
return origin; | ||
} | ||
|
||
public void setOrigin(String origin) { | ||
this.origin = origin; | ||
} | ||
|
||
public Type getType() { | ||
return type; | ||
} | ||
|
||
public void setType(Type type) { | ||
this.type = type; | ||
} | ||
|
||
public enum Type { | ||
GITHUB, BITBUCKET_CLOUD, GITLAB, BITBUCKET | ||
} | ||
} | ||
|
||
public List<ScmRepository> getRepositories() { | ||
return repositories; | ||
} | ||
|
||
public void setRepositories(List<ScmRepository> repositories) { | ||
this.repositories = repositories; | ||
} | ||
|
||
public boolean isAllowMissingScmOrigins() { | ||
return allowMissingScmOrigins; | ||
} | ||
|
||
public void setAllowMissingScmOrigins(boolean allowMissingScmOrigins) { | ||
this.allowMissingScmOrigins = allowMissingScmOrigins; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,3 +1,15 @@ | ||
management.endpoints.web.exposure.include: prometheus,health | ||
management.endpoint.prometheus.enabled: true | ||
management.endpoint.health.enabled: true | ||
management.endpoint.health.enabled: true | ||
moderne: | ||
scm: | ||
allowMissingScmOrigins: true | ||
repositories: | ||
- origin: github.com | ||
type: GITHUB | ||
- origin: bitbucket.org | ||
type: BITBUCKET_CLOUD | ||
- origin: gitlab.com | ||
type: GITLAB | ||
- origin: https://bitbucket.example.com/stash | ||
type: BITBUCKET |
This file was deleted.
Oops, something went wrong.
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