input) throws WebHookHtmlRendererException;
8 |
9 | public static class WebHookHtmlRendererException extends Exception {
10 |
11 | private static final long serialVersionUID = 1L;
12 |
13 | public WebHookHtmlRendererException(Exception ex) {
14 | super(ex);
15 | }
16 |
17 | public WebHookHtmlRendererException(String message) {
18 | super(message);
19 | }
20 |
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/template/render/XmlToHtmlPrettyPrintingRenderer.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.template.render;
2 |
3 | import java.util.Map;
4 |
5 | public class XmlToHtmlPrettyPrintingRenderer implements WebHookStringRenderer {
6 |
7 |
8 | HtmlRenderer htmlr = new HtmlRenderer();
9 |
10 | @Override
11 | public String render(String uglyXmlString) throws WebHookHtmlRendererException {
12 | return "" + htmlr.render(uglyXmlString) + "
";
13 | }
14 |
15 | @Override
16 | public String render(Map input) throws WebHookHtmlRendererException {
17 | throw new WebHookHtmlRendererException("Not expecting a Map.");
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/util/StringSanitiser.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.util;
2 |
3 | public class StringSanitiser {
4 |
5 | private StringSanitiser(){}
6 |
7 | public static String sanitise(String dirtyString) {
8 | return dirtyString
9 | .replace("<", "_")
10 | .replace(">", "_")
11 | .replace("\\", "_")
12 | .replace("/", "_")
13 | .replace("$", "_")
14 | .replace("%", "_")
15 | .replace("#", "_")
16 | .replace("@", "_")
17 | .replace("!", "_")
18 | .replace("`", "_")
19 | .replace("~", "_")
20 | .replace("?", "_")
21 | .replace("|", "_")
22 | .replace("*", "_")
23 | .replace("(", "_")
24 | .replace(")", "_")
25 | .replace("^", "_")
26 | ;
27 | }
28 |
29 | public static String sanitize(String dirtyString){
30 | return sanitise(dirtyString);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/variableresolver/VariableMessageBuilder.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.variableresolver;
2 |
3 | public interface VariableMessageBuilder {
4 |
5 | public abstract String build(String template);
6 | public abstract void addWebHookPayload(String webHookContent);
7 |
8 | }
9 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/variableresolver/VariableResolver.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.variableresolver;
2 |
3 | public interface VariableResolver {
4 | public String resolve(String variable);
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/variableresolver/WebHookVariableResolverManager.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.variableresolver;
2 |
3 | import java.util.List;
4 | import java.util.Map;
5 |
6 | import webhook.teamcity.payload.PayloadTemplateEngineType;
7 |
8 | public interface WebHookVariableResolverManager {
9 |
10 | void registerVariableResolverFactory(VariableResolverFactory factory);
11 |
12 | VariableResolverFactory getVariableResolverFactory(PayloadTemplateEngineType type);
13 |
14 | Map getAllVariableResolverFactoriesMap();
15 | List getAllVariableResolverFactories();
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/variableresolver/velocity/VelocityCapitalizeDirective.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.variableresolver.velocity;
2 | public class VelocityCapitalizeDirective extends VelocityCapitaliseDirective {
3 |
4 | @Override
5 | public String getName() {
6 | return "capitalize";
7 | }
8 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/variableresolver/velocity/VelocityNullUtils.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.variableresolver.velocity;
2 |
3 | import java.util.Objects;
4 |
5 | public class VelocityNullUtils {
6 |
7 | private static final String UNRESOLVED = "UNRESOLVED";
8 |
9 | public Object toUnResolved(Object value) {
10 | if (Objects.isNull(value)) {
11 | return UNRESOLVED;
12 | }
13 | return value;
14 | }
15 |
16 | public Object toUnResolved(Object value, boolean wrapWithQuotes) {
17 | if (Objects.isNull(value)) {
18 | return wrapWithQuotes ? "\"" + toUnResolved(value) + "\"" : toUnResolved(value);
19 | }
20 | return value;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/payload/variableresolver/velocity/VelocitySanitizeDirective.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.payload.variableresolver.velocity;
2 | public class VelocitySanitizeDirective extends VelocitySanitiseDirective {
3 |
4 | @Override
5 | public String getName() {
6 | return "sanitize";
7 | }
8 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/WebHookConfigChangeHandler.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings;
2 |
3 | public interface WebHookConfigChangeHandler {
4 | public abstract void handleConfigFileChange();
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/WebHookProjectSettingsFactory.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings;
2 |
3 | import jetbrains.buildServer.serverSide.settings.ProjectSettingsFactory;
4 | import jetbrains.buildServer.serverSide.settings.ProjectSettingsManager;
5 | import webhook.teamcity.Loggers;
6 |
7 | public class WebHookProjectSettingsFactory implements ProjectSettingsFactory {
8 |
9 | public WebHookProjectSettingsFactory(ProjectSettingsManager projectSettingsManager){
10 | Loggers.SERVER.debug("WebHookProjectSettingsFactory :: Registering");
11 | projectSettingsManager.registerSettingsFactory("webhooks", this);
12 | }
13 |
14 | public WebHookProjectSettings createProjectSettings(String projectId) {
15 | Loggers.SERVER.info("WebHookProjectSettingsFactory: re-reading settings for " + projectId);
16 | return new WebHookProjectSettings();
17 | }
18 |
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/WebHookSearchResult.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import lombok.Getter;
7 | import lombok.Setter;
8 |
9 | @Getter
10 | public class WebHookSearchResult {
11 | private List matches = new ArrayList<>();
12 | @Setter
13 | private WebHookConfigEnhanced webHookConfigEnhanced;
14 | @Setter
15 | private boolean filteredResult = false;
16 |
17 | public void addMatch(Match match) {
18 | this.matches.add(match);
19 | }
20 |
21 | public enum Match {
22 | SHOW, TAG, URL, ID, TEMPLATE, PAYLOAD_FORMAT, PROJECT, BUILD_TYPE
23 | }
24 |
25 | public WebHookConfig getWebHookConfig() {
26 | return this.webHookConfigEnhanced.getWebHookConfig();
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/WebHookSecureValuesEnquirer.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings;
2 |
3 | public interface WebHookSecureValuesEnquirer {
4 |
5 | public boolean isHideSecureValuesEnabled(String webhookId);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/WebHookUpdateResult.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings;
2 |
3 | import lombok.Getter;
4 |
5 | @Getter
6 | public class WebHookUpdateResult {
7 | boolean updated;
8 | WebHookConfig webHookConfig;
9 |
10 | public WebHookUpdateResult(Boolean updated, WebHookConfig webHookConfig) {
11 | this.updated = updated;
12 | this.webHookConfig = webHookConfig;
13 | }
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/project/WebHookParameter.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.project;
2 |
3 | public interface WebHookParameter {
4 |
5 | public String getId();
6 | public void setId(String id);
7 |
8 | public String getName();
9 | public void setName(String name);
10 |
11 | public String getValue();
12 | public void setValue(String value);
13 |
14 | public Boolean getSecure();
15 | public void setSecure(Boolean isSecure);
16 |
17 | public Boolean getIncludedInLegacyPayloads();
18 | public void setIncludedInLegacyPayloads(Boolean isIncluded);
19 | public Boolean getForceResolveTeamCityVariable();
20 | public void setForceResolveTeamCityVariable(Boolean isForceResolved);
21 |
22 | public String getTemplateEngine();
23 |
24 | public void setTemplateEngine(String payloadTemplateEngineType);
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/project/WebHookParameterStoreFactory.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.project;
2 |
3 | public interface WebHookParameterStoreFactory {
4 |
5 | public WebHookParameterStore getWebHookParameterStore();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/secure/WebHookSecretResolver.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.secure;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 |
5 | import jetbrains.buildServer.serverSide.SProject;
6 |
7 | public interface WebHookSecretResolver {
8 |
9 | public String getSecret(@NotNull SProject sProject, @NotNull String token);
10 |
11 | }
12 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/settings/secure/WebHookSecretResolverNoOpImpl.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.secure;
2 |
3 | import jetbrains.buildServer.serverSide.SProject;
4 | import webhook.teamcity.Loggers;
5 |
6 | public class WebHookSecretResolverNoOpImpl implements WebHookSecretResolver {
7 |
8 | public WebHookSecretResolverNoOpImpl() {
9 | Loggers.SERVER.info("WebHookSecretResolverNoOpImpl :: Starting WebHookSecretResolver for verions older than 2017.1");
10 | }
11 |
12 |
13 | @Override
14 | public String getSecret(SProject sProject, String token) {
15 | return null;
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/NoOpValueHasher.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | public class NoOpValueHasher implements ValueHasher {
4 |
5 | @Override
6 | public String hash(String plain) {
7 | return plain;
8 | }
9 | @Override
10 | public String hash(String plain, String salt) {
11 | return plain;
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/StatisticsJaxHelper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | public class StatisticsJaxHelper extends JaxHelperImpl implements JaxHelper{
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/StatisticsReport.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | import java.util.List;
4 |
5 | import lombok.Data;
6 |
7 | @Data
8 | public class StatisticsReport {
9 |
10 | WebHooksPluginInfo pluginInfo;
11 | TeamCityInstanceInfo instanceInfo;
12 | WebHookConfigurationStatistics configStatistics;
13 | List reports;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/TeamCityInstanceInfo.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | @Getter @Setter
7 | public class TeamCityInstanceInfo {
8 |
9 | String teamcityVersion;
10 | String teamcityBuild;
11 | String teamcityId;
12 | boolean webHookProxyConfigured;
13 | }
14 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/ValueHasher.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | public interface ValueHasher {
4 | public String hash(String plain);
5 | public String hash(String plain, String salt);
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/WebHooksPluginInfo.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class WebHooksPluginInfo {
7 | String tcWehooksVersion;
8 | String tcWebHooksRestApiVersion;
9 | }
10 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/statistics/WebHooksStatisticsReportEventListener.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.statistics;
2 |
3 | import webhook.teamcity.settings.WebHookConfig;
4 |
5 | public interface WebHooksStatisticsReportEventListener {
6 |
7 | /**
8 | * Send the {@link StatisticsReport} using the {@link WebHookConfig}
9 | * @param webHookConfig
10 | * @param statisticsReport
11 | */
12 | public void reportStatistics(WebHookConfig whc, StatisticsReport statisticsReport);
13 |
14 | /**
15 | * Send the {@link StatisticsReport}
16 | * @param statisticsReport
17 | */
18 | public void reportStatistics(StatisticsReport statisticsReport);
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/testing/WebHookConfigFactory.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.testing;
2 |
3 | import webhook.teamcity.settings.WebHookConfig;
4 | import webhook.teamcity.testing.model.WebHookExecutionRequest;
5 | import webhook.teamcity.testing.model.WebHookTemplateExecutionRequest;
6 |
7 | public interface WebHookConfigFactory {
8 |
9 | WebHookConfig build(WebHookExecutionRequest webHookExecutionRequest);
10 | WebHookConfig build(WebHookTemplateExecutionRequest webHookExecutionRequest) throws WebHookConfigNotFoundException;
11 | WebHookConfig buildSimple(WebHookTemplateExecutionRequest webHookTemplateExecutionRequest);
12 |
13 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/testing/WebHookConfigNotFoundException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.testing;
2 |
3 | public class WebHookConfigNotFoundException extends Exception {
4 |
5 | private static final long serialVersionUID = 1933172873766920599L;
6 |
7 | public WebHookConfigNotFoundException(String message, Exception ex) {
8 | super(message, ex);
9 | }
10 |
11 | public WebHookConfigNotFoundException(String message) {
12 | super(message);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/testing/model/WebHookExecutionRequestGsonBuilder.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.testing.model;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.GsonBuilder;
5 |
6 | import webhook.teamcity.BuildStateEnum;
7 |
8 | public class WebHookExecutionRequestGsonBuilder {
9 |
10 | private WebHookExecutionRequestGsonBuilder() {}
11 |
12 | public static Gson gsonBuilder() {
13 | return new GsonBuilder()
14 | .registerTypeAdapter(BuildStateEnum.class, new BuildStateEnumTypeAdaptor())
15 | .enableComplexMapKeySerialization()
16 | .setPrettyPrinting()
17 | .create();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/main/java/webhook/teamcity/testing/model/WebHookRenderResult.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.testing.model;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public class WebHookRenderResult {
7 |
8 | public WebHookRenderResult(String html, String format) {
9 | this.html = html;
10 | this.format = format;
11 | this.errored = false;
12 | }
13 |
14 | public WebHookRenderResult(String text, Exception exception) {
15 | this.html = text;
16 | this.exception = exception;
17 | this.errored = true;
18 | }
19 |
20 | String html;
21 | String format;
22 | Boolean errored;
23 | Exception exception;
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/java/webhook/ResponseEvent.java:
--------------------------------------------------------------------------------
1 | package webhook;
2 |
3 | public interface ResponseEvent {
4 | public abstract int getReponseCode();
5 | public abstract void updateResponseCode(int responseCode);
6 | public abstract String getRequestBody();
7 | public abstract void updateRequestBody(String requsetBody);
8 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/java/webhook/WebHookTestServerTestBase.java:
--------------------------------------------------------------------------------
1 | package webhook;
2 |
3 | public abstract class WebHookTestServerTestBase {
4 |
5 | public abstract String getHost();
6 | public abstract Integer getPort();
7 |
8 |
9 | public WebHookTestServer startWebServer(){
10 | try {
11 | WebHookTestServer s = new WebHookTestServer(getHost(), getPort());
12 | s.getServer().start();
13 | return s;
14 | } catch (Exception e) {
15 | e.printStackTrace();
16 | }
17 | return null;
18 | }
19 |
20 | public void stopWebServer(WebHookTestServer s) throws InterruptedException {
21 | try {
22 | s.getServer().stop();
23 | // Sleep to let the server shutdown cleanly.
24 | } catch (Exception e) {
25 | e.printStackTrace();
26 | } finally {
27 | Thread.sleep(100);
28 | }
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/java/webhook/teamcity/MockBranch.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity;
2 |
3 | import jetbrains.buildServer.serverSide.Branch;
4 |
5 | public class MockBranch implements Branch {
6 |
7 | private String name = "refs/heads/master";
8 | private String displayName = "master";
9 | private boolean defaultBranch = false;
10 |
11 | @Override
12 | public String getDisplayName() {
13 | return displayName;
14 | }
15 |
16 | @Override
17 | public String getName() {
18 | return name;
19 | }
20 |
21 | @Override
22 | public boolean isDefaultBranch() {
23 | return defaultBranch;
24 | }
25 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/java/webhook/teamcity/settings/entity/WebHookTemplateJaxTestHelper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.entity;
2 |
3 | import javax.xml.bind.JAXBException;
4 |
5 | /**
6 | * A JAX helper that overrides the write methods with no-ops. Supports Read (from parent class) but does nothing for writes.
7 | * Useful for tests when writing is not required.
8 | */
9 | public class WebHookTemplateJaxTestHelper extends WebHookTemplateJaxHelperImpl implements WebHookTemplateJaxHelper {
10 |
11 |
12 | @Override
13 | public void writeTemplate(WebHookTemplateEntity templates, String configFilePath) throws JAXBException {
14 |
15 | }
16 |
17 | @Override
18 | public void writeTemplates(WebHookTemplates templates, String configFilePath) throws JAXBException {
19 |
20 | }
21 |
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/java/webhook/testframework/Mocked.java:
--------------------------------------------------------------------------------
1 | package webhook.testframework;
2 |
3 | public interface Mocked {
4 |
5 | public int getInvocationCount();
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/java/webhook/testframework/MockingWebHookFactory.java:
--------------------------------------------------------------------------------
1 | package webhook.testframework;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import webhook.WebHook;
7 | import webhook.WebHookProxyConfig;
8 | import webhook.teamcity.WebHookFactory;
9 | import webhook.teamcity.settings.WebHookConfig;
10 |
11 | public class MockingWebHookFactory implements WebHookFactory {
12 |
13 | List webHookMocks = new ArrayList<>();
14 |
15 | @Override
16 | public WebHook getWebHook(WebHookConfig webhookConfig, WebHookProxyConfig pc) {
17 | MockWebHook m = new MockWebHook(webhookConfig, pc);
18 | webHookMocks.add(m);
19 | return m;
20 | }
21 |
22 | public Mocked getMostRecentMock() {
23 | return webHookMocks.get(webHookMocks.size()-1);
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/FileThatDoesExist.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-core/src/test/resources/FileThatDoesExist.txt
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | #log4j.rootLogger=INFO, stdout
3 | log4j.rootLogger=DEBUG, stdout
4 |
5 | # Direct log messages to stdout
6 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
7 | log4j.appender.stdout.Target=System.out
8 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
9 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
10 |
11 | log4j.logger.org.eclipse.jetty=WARN
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/main-config-full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/old_project-settings-test-webhook-disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/project-settings-test-webhook-disabled.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/testWebHookRequest/webhook-request-01.json:
--------------------------------------------------------------------------------
1 | {
2 | "buildId" : 2834,
3 | "projectExternalId" : "TcPluginsLocal",
4 | "testBuildState" : "buildStarted",
5 | "url" : "http://localhost:8111/webhooks/endpoint.html",
6 | "templateId" : "slack.com-compact",
7 | "payloadFormat" : "jsontemplate",
8 | "authType" : null,
9 | "authEnabled" : false,
10 | "configBuildStates" : {
11 | "buildSuccessful" : true,
12 | "changesLoaded" : false,
13 | "buildFailed" : true,
14 | "buildBroken" : true,
15 | "buildStarted" : false,
16 | "beforeBuildFinish" : false,
17 | "responsibilityChanged" : false,
18 | "BUILD_FIXED" : true,
19 | "BUILD_INTERRUPTED" : false
20 | }
21 | }
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/testdoc1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/testdoc2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tcwebhooks-core/src/test/resources/testrealm.txt:
--------------------------------------------------------------------------------
1 | user1: user1pass,user
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.classpath
3 | /.project
4 | /.settings
5 | /.apt_generated_tests/
6 | /bin
7 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0-sources.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0-sources.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.pom:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | jetbrains.teamcity.9
6 | rest-api
7 | 9.1
8 | POM was created from install:install-file
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api-legacy/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.zip
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/pluginfixer/FileStatus.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.pluginfixer;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | @Setter @Getter
7 | public class FileStatus {
8 | String filename;
9 | boolean isFound = true;
10 | boolean isRemoved = false;
11 | boolean isErrored = false;
12 | String failureMessage;
13 |
14 | FileStatus(String filename) {
15 | this.filename = filename;
16 | }
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/data/WebHookTemplateConfigWrapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.data;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import webhook.teamcity.payload.WebHookTemplateManager;
6 | import webhook.teamcity.settings.config.WebHookTemplateConfig;
7 |
8 | @Getter @AllArgsConstructor
9 | public class WebHookTemplateConfigWrapper {
10 |
11 | private WebHookTemplateConfig templateConfig;
12 |
13 | private String externalProjectId;
14 |
15 | private WebHookTemplateManager.TemplateState status;
16 |
17 | private WebHookTemplateStates buildStatesWithTemplate;
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/BadRequestException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class BadRequestException extends RuntimeException {
6 | private static final long serialVersionUID = 8664310771373654913L;
7 | private final ErrorResult result;
8 |
9 | public BadRequestException(String message) {
10 | super(message);
11 | this.result = null;
12 | }
13 |
14 | public BadRequestException(String message, ErrorResult result) {
15 | super(message);
16 | this.result = result;
17 | }
18 |
19 | public BadRequestException(String message, Throwable cause, ErrorResult result) {
20 | super(message, cause);
21 | this.result = result;
22 | }
23 |
24 | public ErrorResult getResult() {
25 | return result;
26 | }
27 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/JaxbClassCastException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class JaxbClassCastException extends RuntimeException {
6 | private static final long serialVersionUID = 8664310771373654913L;
7 | private final ErrorResult result;
8 |
9 | public JaxbClassCastException(String message, ErrorResult result) {
10 | super(message);
11 | this.result = result;
12 | }
13 |
14 | public JaxbClassCastException(String message, Throwable cause, ErrorResult result) {
15 | super(message, cause);
16 | this.result = result;
17 | }
18 |
19 | public ErrorResult getResult() {
20 | return result;
21 | }
22 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/JaxbClassCastExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class JaxbClassCastExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(JaxbClassCastException exception) {
12 | Response.ResponseBuilder builder = Response.status(422);
13 | builder.entity(exception.getResult());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/TemplateInUseException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class TemplateInUseException extends RuntimeException {
6 |
7 | private static final long serialVersionUID = 1062265324610559830L;
8 | private final ErrorResult result;
9 |
10 | public TemplateInUseException(String message, ErrorResult result) {
11 | super(message);
12 | this.result = result;
13 | }
14 |
15 | public TemplateInUseException(String message, Throwable cause, ErrorResult result) {
16 | super(message, cause);
17 | this.result = result;
18 | }
19 |
20 | public ErrorResult getResult() {
21 | return result;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/TemplateInUseExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import javax.ws.rs.core.Response;
4 | import javax.ws.rs.ext.ExceptionMapper;
5 | import javax.ws.rs.ext.Provider;
6 |
7 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
8 |
9 | @Provider
10 | public class TemplateInUseExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
11 |
12 | public Response toResponse(TemplateInUseException exception) {
13 | Response.ResponseBuilder builder = Response.status(409);
14 | builder.entity(exception.getResult());
15 | return builder.build();
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/TemplatePermissionException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | @SuppressWarnings("serial")
4 | public class TemplatePermissionException extends RuntimeException {
5 |
6 | public TemplatePermissionException(String message) {
7 | super(message);
8 | }
9 |
10 | public TemplatePermissionException(String message, Throwable cause) {
11 | super(message, cause);
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/TemplatePermissionExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class TemplatePermissionExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(TemplatePermissionException exception) {
12 | Response.ResponseBuilder builder = Response.status(403);
13 | builder.entity(exception.getMessage());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/UnprocessableEntityException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class UnprocessableEntityException extends RuntimeException {
6 | private static final long serialVersionUID = 8664310771373654913L;
7 | private final ErrorResult result;
8 |
9 | public UnprocessableEntityException(String message, ErrorResult result) {
10 | super(message);
11 | this.result = result;
12 | }
13 |
14 | public UnprocessableEntityException(String message, Throwable cause, ErrorResult result) {
15 | super(message, cause);
16 | this.result = result;
17 | }
18 |
19 | public ErrorResult getResult() {
20 | return result;
21 | }
22 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/UnprocessableEntityExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class UnprocessableEntityExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(UnprocessableEntityException exception) {
12 | Response.ResponseBuilder builder = Response.status(422);
13 | builder.entity(exception.getResult());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/WebHookPermissionException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | @SuppressWarnings("serial")
4 | public class WebHookPermissionException extends RuntimeException {
5 |
6 | public WebHookPermissionException(String message) {
7 | super(message);
8 | }
9 |
10 | public WebHookPermissionException(String message, Throwable cause) {
11 | super(message, cause);
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/errors/WebHookPermissionExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class WebHookPermissionExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(WebHookPermissionException exception) {
12 | Response.ResponseBuilder builder = Response.status(403);
13 | builder.entity(exception.getMessage());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/mainconfig/NoProxy.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.mainconfig;
2 |
3 | import javax.xml.bind.annotation.XmlAccessType;
4 | import javax.xml.bind.annotation.XmlAccessorType;
5 | import javax.xml.bind.annotation.XmlAttribute;
6 | import javax.xml.bind.annotation.XmlType;
7 |
8 | import lombok.Data;
9 |
10 | /* Use the XmlAttributes on the fields rather than the getters
11 | * and setters provided by Lombok */
12 | @XmlAccessorType(XmlAccessType.FIELD)
13 |
14 | @Data // Let Lombok generate the getters and setters.
15 |
16 | @XmlType (name="noproxy")
17 | public class NoProxy {
18 | @XmlAttribute
19 | String url;
20 |
21 | /**
22 | * No Arg constructor for JAXB.
23 | */
24 | public NoProxy () {
25 | }
26 |
27 | public NoProxy(String noProxyUrl) {
28 | this.url = noProxyUrl;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/template/ErrorResult.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | import java.io.Serializable;
4 | import java.util.LinkedHashMap;
5 | import java.util.Map;
6 |
7 | import javax.xml.bind.annotation.XmlRootElement;
8 |
9 | import lombok.Data;
10 |
11 | @Data @XmlRootElement
12 | public class ErrorResult implements Serializable {
13 |
14 | private static final long serialVersionUID = -8395102761842280396L;
15 | private Map errors = new LinkedHashMap<>();
16 |
17 | public ErrorResult addError(String fieldname, String errorMessage) {
18 | this.errors.put(fieldname, errorMessage);
19 | return this;
20 | }
21 |
22 | public boolean isErrored() {
23 | return ! this.errors.isEmpty();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/template/Format.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | import javax.xml.bind.annotation.XmlAttribute;
4 | import javax.xml.bind.annotation.XmlRootElement;
5 | import javax.xml.bind.annotation.XmlType;
6 |
7 |
8 |
9 | @XmlRootElement(name = "format")
10 | @XmlType(name = "format", propOrder = {"name", "enabled"})
11 | public class Format {
12 |
13 | @XmlAttribute
14 | public String name;
15 |
16 |
17 | @XmlAttribute
18 | public Boolean enabled;
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/template/TemplateTestExecutionRequest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | import javax.xml.bind.annotation.XmlRootElement;
4 |
5 | import lombok.AllArgsConstructor;
6 | import lombok.Getter;
7 | import lombok.NoArgsConstructor;
8 | import lombok.Setter;
9 |
10 | @XmlRootElement
11 | @Getter
12 | @Setter
13 | @AllArgsConstructor @NoArgsConstructor
14 | public class TemplateTestExecutionRequest {
15 |
16 | String format;
17 | String templateText;
18 | String branchTemplateText;
19 | boolean useTemplateTextForBranch;
20 | String buildId;
21 | String projectExternalId;
22 | String url;
23 | String webhookId;
24 | String buildStateName;
25 | }
26 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/template/TemplateText.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | public class TemplateText {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/webhook/CustomTemplate.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.webhook;
2 |
3 | import javax.xml.bind.annotation.XmlAttribute;
4 | import javax.xml.bind.annotation.XmlRootElement;
5 |
6 | /*
7 | *
8 | */
9 |
10 | @XmlRootElement(name="customTemplate")
11 | public class CustomTemplate {
12 | private String type;
13 | private String template;
14 | private Boolean enabled;
15 |
16 | @XmlAttribute
17 | public String getType() {
18 | return type;
19 | }
20 |
21 | @XmlAttribute
22 | public String getTemplate() {
23 | return template;
24 | }
25 |
26 | @XmlAttribute
27 | public Boolean getEnabled() {
28 | return enabled;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/model/webhook/ProjectWebhookState.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.webhook;
2 |
3 | import javax.xml.bind.annotation.XmlAttribute;
4 | import javax.xml.bind.annotation.XmlRootElement;
5 | import javax.xml.bind.annotation.XmlType;
6 |
7 | /*
8 | *
9 | */
10 |
11 | @XmlRootElement (name="state")
12 | @XmlType (name = "state",propOrder = { "type", "enabled" })
13 | public class ProjectWebhookState {
14 |
15 | @XmlAttribute
16 | public String type;
17 |
18 | @XmlAttribute
19 | Boolean enabled;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/request/ApiRequest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.request;
2 |
3 | public interface ApiRequest {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/request/Constants.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.request;
2 | public class Constants {
3 |
4 | private Constants() {}
5 |
6 | public static final String DEFAULT_PAGE_ITEMS_COUNT = "100";
7 | public static final int DEFAULT_PAGE_ITEMS_COUNT_INT = 100;
8 |
9 | public static final String API_URL = "/app/rest/webhooks";
10 |
11 | public static final String BIND_PATH_PROPERTY_NAME = "api.path";
12 | public static final String ORIGINAL_REQUEST_URI_HEADER_NAME = "original-request-uri";
13 |
14 | public static final String EXTERNAL_APPLICATION_WADL_NAME = "/application.wadl"; //name that user requests will use
15 | public static final String JERSEY_APPLICATION_WADL_NAME = "/application.wadl";
16 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/java/webhook/teamcity/server/rest/web/WebHookRestApiActionController.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.web;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 |
5 | import jetbrains.buildServer.controllers.BaseAjaxActionController;
6 | import jetbrains.buildServer.web.openapi.WebControllerManager;
7 |
8 | /**
9 | * This class simply holds the actions available at
10 | * "/admin/manageWebHooksRestApi.html" Actions need to inject this class and
11 | * register themselves.
12 | */
13 | public class WebHookRestApiActionController extends BaseAjaxActionController {
14 |
15 | public static final String ACTION_TYPE = "action";
16 |
17 | public WebHookRestApiActionController(@NotNull final WebControllerManager controllerManager) {
18 | super(controllerManager);
19 | controllerManager.registerController("/admin/manageWebHooksRestApi.html", this);
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/resources/buildServerResources/WebHookRestApi/restApiHealthRestartStatus.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="jetbrains.buildServer.web.openapi.healthStatus.HealthStatusItemDisplayMode" %>
2 | <%@ include file="/include-internal.jsp" %>
3 |
4 |
5 |
6 | "/>
7 |
8 | WebHook REST API files have been cleaned. Please restart TeamCity. More info.
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/resources/buildServerResources/WebHookRestApi/restApiHealthStatus.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="jetbrains.buildServer.web.openapi.healthStatus.HealthStatusItemDisplayMode" %>
2 | <%@ include file="/include-internal.jsp" %>
3 |
4 |
5 |
6 | "/>
7 | "/>
8 |
9 | Editing of WebHook Templates via the WebUI or
10 | REST API may fail due to a jar conflict in TeamCity's
11 | bundled REST API jars. More info.
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/main/resources/buildServerResources/WebHookRestApi/serverNoRestart.js:
--------------------------------------------------------------------------------
1 | BS.ServerRestarter = {
2 |
3 | restartServer: function () {
4 | alert("Sorry. Restarting is only supported since TeamCity 2017.2")
5 | return false;
6 | }
7 | };
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/java/webhook/teamcity/server/rest/model/mainconfig/WebhooksTest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.mainconfig;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import org.junit.Test;
6 |
7 | public class WebhooksTest {
8 |
9 | @Test
10 | public void test() {
11 | Webhooks webhooks = new Webhooks();
12 | Information info = new Information();
13 | info.setUrl("http://example.com");
14 | info.setText("Some blurb");
15 |
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/java/webhook/teamcity/settings/entity/WebHookTemplateJaxTestHelper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.entity;
2 |
3 | import javax.xml.bind.JAXBException;
4 |
5 | public class WebHookTemplateJaxTestHelper extends WebHookTemplateJaxHelperImpl implements WebHookTemplateJaxHelper {
6 |
7 |
8 | @Override
9 | public void writeTemplates(WebHookTemplates templates, String configFilePath) throws JAXBException {
10 | // No writes needed in test implementation
11 | }
12 |
13 |
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/java/webhook/teamcity/test/jerseyprovider/ProjectIdResolverMock.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.test.jerseyprovider;
2 |
3 | import webhook.teamcity.ProjectIdResolver;
4 |
5 | public class ProjectIdResolverMock implements ProjectIdResolver {
6 |
7 | @Override
8 | public String getExternalProjectId(String internalProjectId) {
9 | if (internalProjectId.equalsIgnoreCase("_Root")) {
10 | return "_Root";
11 | }
12 | return "TestProject";
13 | }
14 |
15 | @Override
16 | public String getInternalProjectId(String externalProjectId) {
17 | if (externalProjectId.equalsIgnoreCase("_Root")) {
18 | return "_Root";
19 | }
20 | return "project1";
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/java/webhook/teamcity/test/jerseyprovider/RequestPathTransformInfoProvider.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.test.jerseyprovider;
2 |
3 | import javax.ws.rs.ext.Provider;
4 |
5 | import jetbrains.buildServer.server.rest.RequestPathTransformInfo;
6 | import jetbrains.buildServer.server.rest.jersey.AbstractSingletonBeanProvider;
7 |
8 |
9 | @Provider
10 | public class RequestPathTransformInfoProvider extends AbstractSingletonBeanProvider {
11 | public RequestPathTransformInfoProvider() {
12 | super(new RequestPathTransformInfo(), RequestPathTransformInfo.class);
13 | }
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/java/webhook/teamcity/test/springmock/MockingWebHookSettingsEventHandler.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.test.springmock;
2 |
3 | import webhook.teamcity.WebHookSettingsEventHandler;
4 |
5 | public class MockingWebHookSettingsEventHandler implements WebHookSettingsEventHandler {
6 |
7 | @Override
8 | public void handleEvent(WebHookSettingsEvent eventType) {
9 | // TODO Auto-generated method stub
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/resources/REST-examples/create-template-post.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "name" : "testJsonTemplate01",
4 | "description" : "A test template in JSON format (version 1).",
5 | "formats" : [
6 | {
7 | "enabled" : true,
8 | "name" : "jsonTemplate"
9 | }
10 | ]
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/rest-api.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api-legacy/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/rest-api.zip
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/somefile.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api-legacy/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/somefile.zip
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | log4j.rootLogger=INFO, stdout
3 |
4 | # Direct log messages to stdout
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.Target=System.out
7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
8 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
9 |
10 | log4j.logger.org.eclipse.jetty=WARN
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/resources/main-config-full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api-legacy/src/test/resources/spring-test-config.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.classpath
3 | /.project
4 | /.settings
5 | /.apt_generated_tests/
6 | /bin
7 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/2024/rest-api/2024.03/rest-api-2024.03.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/2024/rest-api/2024.03/rest-api-2024.03.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/2024/rest-api/2024.03/rest-api-2024.03.pom:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | jetbrains.teamcity.2024
6 | rest-api
7 | 2024.03
8 | POM was created from install:install-file
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0-sources.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0-sources.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.0/rest-api-9.0.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.jar
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.pom:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | jetbrains.teamcity.9
6 | rest-api
7 | 9.1
8 | POM was created from install:install-file
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/lib-compile/jetbrains/teamcity/9/rest-api/9.1/rest-api-9.1.zip
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/pluginfixer/FileStatus.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.pluginfixer;
2 |
3 | import lombok.Getter;
4 | import lombok.Setter;
5 |
6 | @Setter @Getter
7 | public class FileStatus {
8 | String filename;
9 | boolean isFound = true;
10 | boolean isRemoved = false;
11 | boolean isErrored = false;
12 | String failureMessage;
13 |
14 | FileStatus(String filename) {
15 | this.filename = filename;
16 | }
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/data/WebHookTemplateConfigWrapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.data;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 | import webhook.teamcity.payload.WebHookTemplateManager;
6 | import webhook.teamcity.settings.config.WebHookTemplateConfig;
7 |
8 | @Getter @AllArgsConstructor
9 | public class WebHookTemplateConfigWrapper {
10 |
11 | private WebHookTemplateConfig templateConfig;
12 |
13 | private String externalProjectId;
14 |
15 | private WebHookTemplateManager.TemplateState status;
16 |
17 | private WebHookTemplateStates buildStatesWithTemplate;
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/BadRequestException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class BadRequestException extends RuntimeException {
6 | private static final long serialVersionUID = 8664310771373654913L;
7 | private final ErrorResult result;
8 |
9 | public BadRequestException(String message) {
10 | super(message);
11 | this.result = null;
12 | }
13 |
14 | public BadRequestException(String message, ErrorResult result) {
15 | super(message);
16 | this.result = result;
17 | }
18 |
19 | public BadRequestException(String message, Throwable cause, ErrorResult result) {
20 | super(message, cause);
21 | this.result = result;
22 | }
23 |
24 | public ErrorResult getResult() {
25 | return result;
26 | }
27 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/JaxbClassCastException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class JaxbClassCastException extends RuntimeException {
6 | private static final long serialVersionUID = 8664310771373654913L;
7 | private final ErrorResult result;
8 |
9 | public JaxbClassCastException(String message, ErrorResult result) {
10 | super(message);
11 | this.result = result;
12 | }
13 |
14 | public JaxbClassCastException(String message, Throwable cause, ErrorResult result) {
15 | super(message, cause);
16 | this.result = result;
17 | }
18 |
19 | public ErrorResult getResult() {
20 | return result;
21 | }
22 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/JaxbClassCastExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class JaxbClassCastExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(JaxbClassCastException exception) {
12 | Response.ResponseBuilder builder = Response.status(422);
13 | builder.entity(exception.getResult());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/TemplateInUseException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class TemplateInUseException extends RuntimeException {
6 |
7 | private static final long serialVersionUID = 1062265324610559830L;
8 | private final ErrorResult result;
9 |
10 | public TemplateInUseException(String message, ErrorResult result) {
11 | super(message);
12 | this.result = result;
13 | }
14 |
15 | public TemplateInUseException(String message, Throwable cause, ErrorResult result) {
16 | super(message, cause);
17 | this.result = result;
18 | }
19 |
20 | public ErrorResult getResult() {
21 | return result;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/TemplateInUseExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import javax.ws.rs.core.Response;
4 | import javax.ws.rs.ext.ExceptionMapper;
5 | import javax.ws.rs.ext.Provider;
6 |
7 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
8 |
9 | @Provider
10 | public class TemplateInUseExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
11 |
12 | public Response toResponse(TemplateInUseException exception) {
13 | Response.ResponseBuilder builder = Response.status(409);
14 | builder.entity(exception.getResult());
15 | return builder.build();
16 | }
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/TemplatePermissionException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | @SuppressWarnings("serial")
4 | public class TemplatePermissionException extends RuntimeException {
5 |
6 | public TemplatePermissionException(String message) {
7 | super(message);
8 | }
9 |
10 | public TemplatePermissionException(String message, Throwable cause) {
11 | super(message, cause);
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/TemplatePermissionExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class TemplatePermissionExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(TemplatePermissionException exception) {
12 | Response.ResponseBuilder builder = Response.status(403);
13 | builder.entity(exception.getMessage());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/UnprocessableEntityException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | import webhook.teamcity.server.rest.model.template.ErrorResult;
4 |
5 | public class UnprocessableEntityException extends RuntimeException {
6 | private static final long serialVersionUID = 8664310771373654913L;
7 | private final ErrorResult result;
8 |
9 | public UnprocessableEntityException(String message, ErrorResult result) {
10 | super(message);
11 | this.result = result;
12 | }
13 |
14 | public UnprocessableEntityException(String message, Throwable cause, ErrorResult result) {
15 | super(message, cause);
16 | this.result = result;
17 | }
18 |
19 | public ErrorResult getResult() {
20 | return result;
21 | }
22 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/UnprocessableEntityExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class UnprocessableEntityExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(UnprocessableEntityException exception) {
12 | Response.ResponseBuilder builder = Response.status(422);
13 | builder.entity(exception.getResult());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/WebHookPermissionException.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 |
3 | @SuppressWarnings("serial")
4 | public class WebHookPermissionException extends RuntimeException {
5 |
6 | public WebHookPermissionException(String message) {
7 | super(message);
8 | }
9 |
10 | public WebHookPermissionException(String message, Throwable cause) {
11 | super(message, cause);
12 | }
13 |
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/errors/WebHookPermissionExceptionMapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.errors;
2 | import javax.ws.rs.core.Response;
3 | import javax.ws.rs.ext.ExceptionMapper;
4 | import javax.ws.rs.ext.Provider;
5 |
6 | import jetbrains.buildServer.server.rest.jersey.ExceptionMapperUtil;
7 |
8 | @Provider
9 | public class WebHookPermissionExceptionMapper extends ExceptionMapperUtil implements ExceptionMapper {
10 |
11 | public Response toResponse(WebHookPermissionException exception) {
12 | Response.ResponseBuilder builder = Response.status(403);
13 | builder.entity(exception.getMessage());
14 | return builder.build();
15 | }
16 |
17 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/jersey/TemplateManagerProvider.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.jersey;
2 |
3 | import org.springframework.stereotype.Service;
4 |
5 | import jetbrains.buildServer.server.rest.jersey.provider.annotated.JerseyInjectableBeanProvider;
6 | import webhook.teamcity.payload.WebHookTemplateManager;
7 |
8 |
9 | @Service
10 | public class TemplateManagerProvider implements JerseyInjectableBeanProvider {
11 | @Override
12 | public Class> getBeanClass() {
13 | return WebHookTemplateManager.class;
14 | }
15 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/jersey/WebHookParameterStoreFactoryProvider.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.jersey;
2 |
3 | import jetbrains.buildServer.server.rest.jersey.provider.annotated.JerseyInjectableBeanProvider;
4 | import org.springframework.stereotype.Service;
5 | import webhook.teamcity.settings.project.WebHookParameterStoreFactory;
6 |
7 | @Service
8 | public class WebHookParameterStoreFactoryProvider implements JerseyInjectableBeanProvider {
9 | @Override
10 | public Class> getBeanClass() {
11 | return WebHookParameterStoreFactory.class;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/jersey/WebHookPluginDataResolverProvider.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.jersey;
2 |
3 | import org.springframework.stereotype.Service;
4 |
5 | import jetbrains.buildServer.server.rest.jersey.provider.annotated.JerseyInjectableBeanProvider;
6 | import webhook.teamcity.WebHookPluginDataResolver;
7 |
8 | @Service
9 | public class WebHookPluginDataResolverProvider implements JerseyInjectableBeanProvider {
10 | @Override
11 | public Class> getBeanClass() {
12 | return WebHookPluginDataResolver.class;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/jersey/WebHookSettingsManagerProvider.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.jersey;
2 |
3 | import javax.ws.rs.ext.Provider;
4 |
5 | import org.springframework.stereotype.Service;
6 |
7 | import jetbrains.buildServer.server.rest.jersey.provider.annotated.JerseyInjectableBeanProvider;
8 | import webhook.teamcity.settings.WebHookSettingsManager;
9 |
10 | @Service
11 | public class WebHookSettingsManagerProvider implements JerseyInjectableBeanProvider {
12 | @Override
13 | public Class> getBeanClass() {
14 | return WebHookSettingsManager.class;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/mainconfig/NoProxy.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.mainconfig;
2 |
3 | import javax.xml.bind.annotation.XmlAccessType;
4 | import javax.xml.bind.annotation.XmlAccessorType;
5 | import javax.xml.bind.annotation.XmlAttribute;
6 | import javax.xml.bind.annotation.XmlType;
7 |
8 | import lombok.Data;
9 |
10 | /* Use the XmlAttributes on the fields rather than the getters
11 | * and setters provided by Lombok */
12 | @XmlAccessorType(XmlAccessType.FIELD)
13 |
14 | @Data // Let Lombok generate the getters and setters.
15 |
16 | @XmlType (name="noproxy")
17 | public class NoProxy {
18 | @XmlAttribute
19 | String url;
20 |
21 | /**
22 | * No Arg constructor for JAXB.
23 | */
24 | public NoProxy () {
25 | }
26 |
27 | public NoProxy(String noProxyUrl) {
28 | this.url = noProxyUrl;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/template/ErrorResult.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | import java.io.Serializable;
4 | import java.util.LinkedHashMap;
5 | import java.util.Map;
6 |
7 | import javax.xml.bind.annotation.XmlRootElement;
8 |
9 | import lombok.Data;
10 |
11 | @Data @XmlRootElement
12 | public class ErrorResult implements Serializable {
13 |
14 | private static final long serialVersionUID = -8395102761842280396L;
15 | private Map errors = new LinkedHashMap<>();
16 |
17 | public ErrorResult addError(String fieldname, String errorMessage) {
18 | this.errors.put(fieldname, errorMessage);
19 | return this;
20 | }
21 |
22 | public boolean isErrored() {
23 | return ! this.errors.isEmpty();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/template/Format.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | import javax.xml.bind.annotation.XmlAttribute;
4 | import javax.xml.bind.annotation.XmlRootElement;
5 | import javax.xml.bind.annotation.XmlType;
6 |
7 |
8 |
9 | @XmlRootElement(name = "format")
10 | @XmlType(name = "format", propOrder = {"name", "enabled"})
11 | public class Format {
12 |
13 | @XmlAttribute
14 | public String name;
15 |
16 |
17 | @XmlAttribute
18 | public Boolean enabled;
19 |
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/template/TemplateTestExecutionRequest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | import javax.xml.bind.annotation.XmlRootElement;
4 |
5 | import lombok.AllArgsConstructor;
6 | import lombok.Getter;
7 | import lombok.NoArgsConstructor;
8 | import lombok.Setter;
9 |
10 | @XmlRootElement
11 | @Getter
12 | @Setter
13 | @AllArgsConstructor @NoArgsConstructor
14 | public class TemplateTestExecutionRequest {
15 |
16 | String format;
17 | String templateText;
18 | String branchTemplateText;
19 | boolean useTemplateTextForBranch;
20 | String buildId;
21 | String projectExternalId;
22 | String url;
23 | String webhookId;
24 | String buildStateName;
25 | }
26 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/template/TemplateText.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.template;
2 |
3 | public class TemplateText {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/webhook/CustomTemplate.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.webhook;
2 |
3 | import javax.xml.bind.annotation.XmlAttribute;
4 | import javax.xml.bind.annotation.XmlRootElement;
5 |
6 | /*
7 | *
8 | */
9 |
10 | @XmlRootElement(name="customTemplate")
11 | public class CustomTemplate {
12 | private String type;
13 | private String template;
14 | private Boolean enabled;
15 |
16 | @XmlAttribute
17 | public String getType() {
18 | return type;
19 | }
20 |
21 | @XmlAttribute
22 | public String getTemplate() {
23 | return template;
24 | }
25 |
26 | @XmlAttribute
27 | public Boolean getEnabled() {
28 | return enabled;
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/model/webhook/ProjectWebhookState.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.webhook;
2 |
3 | import javax.xml.bind.annotation.XmlAttribute;
4 | import javax.xml.bind.annotation.XmlRootElement;
5 | import javax.xml.bind.annotation.XmlType;
6 |
7 | /*
8 | *
9 | */
10 |
11 | @XmlRootElement (name="state")
12 | @XmlType (name = "state",propOrder = { "type", "enabled" })
13 | public class ProjectWebhookState {
14 |
15 | @XmlAttribute
16 | public String type;
17 |
18 | @XmlAttribute
19 | Boolean enabled;
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/request/ApiRequest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.request;
2 |
3 | public interface ApiRequest {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/request/Constants.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.request;
2 | public class Constants {
3 |
4 | private Constants() {}
5 |
6 | public static final String DEFAULT_PAGE_ITEMS_COUNT = "100";
7 | public static final int DEFAULT_PAGE_ITEMS_COUNT_INT = 100;
8 |
9 | public static final String API_URL = "/app/rest/webhooks";
10 |
11 | public static final String BIND_PATH_PROPERTY_NAME = "api.path";
12 | public static final String ORIGINAL_REQUEST_URI_HEADER_NAME = "original-request-uri";
13 |
14 | public static final String EXTERNAL_APPLICATION_WADL_NAME = "/application.wadl"; //name that user requests will use
15 | public static final String JERSEY_APPLICATION_WADL_NAME = "/application.wadl";
16 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/util/WebHookBeanContext.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.util;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 |
5 | import webhook.teamcity.server.rest.WebHookApiUrlBuilder;
6 | import webhook.teamcity.server.rest.WebHookWebLinks;
7 |
8 | public class WebHookBeanContext {
9 | private final @NotNull WebHookApiUrlBuilder myApiUrlBuilder;
10 | private final @NotNull WebHookWebLinks myWebHookWebLinks;
11 |
12 | public WebHookBeanContext(@NotNull final WebHookWebLinks webHookWebLinks, @NotNull WebHookApiUrlBuilder apiUrlBuilder) {
13 | myWebHookWebLinks = webHookWebLinks;
14 | myApiUrlBuilder = apiUrlBuilder;
15 | }
16 |
17 | @NotNull
18 | public WebHookApiUrlBuilder getApiUrlBuilder() {
19 | return myApiUrlBuilder;
20 | }
21 |
22 | public WebHookWebLinks getWebHookWebLinks() {
23 | return myWebHookWebLinks;
24 | }
25 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/java/webhook/teamcity/server/rest/web/WebHookRestApiActionController.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.web;
2 |
3 | import org.jetbrains.annotations.NotNull;
4 |
5 | import jetbrains.buildServer.controllers.BaseAjaxActionController;
6 | import jetbrains.buildServer.web.openapi.WebControllerManager;
7 |
8 | /**
9 | * This class simply holds the actions available at
10 | * "/admin/manageWebHooksRestApi.html" Actions need to inject this class and
11 | * register themselves.
12 | */
13 | public class WebHookRestApiActionController extends BaseAjaxActionController {
14 |
15 | public static final String ACTION_TYPE = "action";
16 |
17 | public WebHookRestApiActionController(@NotNull final WebControllerManager controllerManager) {
18 | super(controllerManager);
19 | controllerManager.registerController("/admin/manageWebHooksRestApi.html", this);
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/resources/buildServerResources/WebHookRestApi/restApiHealthRestartStatus.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="jetbrains.buildServer.web.openapi.healthStatus.HealthStatusItemDisplayMode" %>
2 | <%@ include file="/include-internal.jsp" %>
3 |
4 |
5 |
6 | "/>
7 |
8 | WebHook REST API files have been cleaned. Please restart TeamCity. More info.
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/resources/buildServerResources/WebHookRestApi/restApiHealthStatus.jsp:
--------------------------------------------------------------------------------
1 | <%@ page import="jetbrains.buildServer.web.openapi.healthStatus.HealthStatusItemDisplayMode" %>
2 | <%@ include file="/include-internal.jsp" %>
3 |
4 |
5 |
6 | "/>
7 | "/>
8 |
9 | Editing of WebHook Templates via the WebUI or
10 | REST API may fail due to a jar conflict in TeamCity's
11 | bundled REST API jars. More info.
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/main/resources/buildServerResources/WebHookRestApi/serverNoRestart.js:
--------------------------------------------------------------------------------
1 | BS.ServerRestarter = {
2 |
3 | restartServer: function () {
4 | alert("Sorry. Restarting is only supported since TeamCity 2017.2")
5 | return false;
6 | }
7 | };
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/java/webhook/teamcity/server/rest/model/mainconfig/WebhooksTest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.server.rest.model.mainconfig;
2 |
3 | import static org.junit.Assert.*;
4 |
5 | import org.junit.Test;
6 |
7 | public class WebhooksTest {
8 |
9 | @Test
10 | public void test() {
11 | Webhooks webhooks = new Webhooks();
12 | Information info = new Information();
13 | info.setUrl("http://example.com");
14 | info.setText("Some blurb");
15 |
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/java/webhook/teamcity/settings/entity/WebHookTemplateJaxTestHelper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.settings.entity;
2 |
3 | import javax.xml.bind.JAXBException;
4 |
5 | public class WebHookTemplateJaxTestHelper extends WebHookTemplateJaxHelperImpl implements WebHookTemplateJaxHelper {
6 |
7 |
8 | @Override
9 | public void writeTemplates(WebHookTemplates templates, String configFilePath) throws JAXBException {
10 | // No writes needed in test implementation
11 | }
12 |
13 |
14 | }
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/java/webhook/teamcity/test/jerseyprovider/ProjectIdResolverMock.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.test.jerseyprovider;
2 |
3 | import webhook.teamcity.ProjectIdResolver;
4 |
5 | public class ProjectIdResolverMock implements ProjectIdResolver {
6 |
7 | @Override
8 | public String getExternalProjectId(String internalProjectId) {
9 | if (internalProjectId.equalsIgnoreCase("_Root")) {
10 | return "_Root";
11 | }
12 | return "TestProject";
13 | }
14 |
15 | @Override
16 | public String getInternalProjectId(String externalProjectId) {
17 | if (externalProjectId.equalsIgnoreCase("_Root")) {
18 | return "_Root";
19 | }
20 | return "project1";
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/resources/REST-examples/create-template-post.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "name" : "testJsonTemplate01",
4 | "description" : "A test template in JSON format (version 1).",
5 | "formats" : [
6 | {
7 | "enabled" : true,
8 | "name" : "jsonTemplate"
9 | }
10 | ]
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/rest-api.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/rest-api.zip
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/somefile.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-rest-api/src/test/resources/catalina_home/webapps/ROOT/WEB-INF/plugins/somefile.zip
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/resources/log4j.properties:
--------------------------------------------------------------------------------
1 | # Root logger option
2 | log4j.rootLogger=INFO, stdout
3 |
4 | # Direct log messages to stdout
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.Target=System.out
7 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
8 | log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
9 |
10 | log4j.logger.org.eclipse.jetty=WARN
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/resources/main-config-full.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-rest-api/src/test/resources/spring-test-config.xml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | /.classpath
3 | /.project
4 | /.settings
5 | /.apt_generated_tests/
6 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/local-mvn-repo/org/jetbrains/teamcity/server/10.0/server-10.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-web-ui/local-mvn-repo/org/jetbrains/teamcity/server/10.0/server-10.0.jar
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/local-mvn-repo/org/jetbrains/teamcity/server/10.0/server-10.0.pom:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | org.jetbrains.teamcity
6 | server
7 | 10.0
8 | POM was created from install:install-file
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/local-mvn-repo/org/jetbrains/teamcity/server/9.1/server-9.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-web-ui/local-mvn-repo/org/jetbrains/teamcity/server/9.1/server-9.1.jar
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/local-mvn-repo/org/jetbrains/teamcity/server/9.1/server-9.1.pom:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | org.jetbrains.teamcity
6 | server
7 | 9.1
8 | POM was created from install:install-file
9 |
10 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/buildrunner/WebHookServiceMessagePropertiesProcessor.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.buildrunner;
2 |
3 | import java.util.ArrayList;
4 | import java.util.Collection;
5 | import java.util.Map;
6 |
7 | import jetbrains.buildServer.serverSide.InvalidProperty;
8 | import jetbrains.buildServer.serverSide.PropertiesProcessor;
9 |
10 | public class WebHookServiceMessagePropertiesProcessor implements PropertiesProcessor {
11 | public Collection process(Map properties) {
12 | return new ArrayList<>();
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/ErrorResult.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import java.io.Serializable;
4 | import java.util.LinkedHashMap;
5 | import java.util.Map;
6 |
7 | import javax.xml.bind.annotation.XmlRootElement;
8 |
9 | import lombok.Data;
10 |
11 | @Data @XmlRootElement
12 | public class ErrorResult implements Serializable {
13 |
14 | private static final long serialVersionUID = -8395102761842280396L;
15 | private Map errors = new LinkedHashMap<>();
16 |
17 | public ErrorResult addError(String fieldname, String errorMessage) {
18 | this.errors.put(fieldname, errorMessage);
19 | return this;
20 | }
21 |
22 | public boolean isErrored() {
23 | return ! this.errors.isEmpty();
24 | }
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/ProjectParametersBean.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jetbrains.buildServer.serverSide.SProject;
7 | import lombok.AllArgsConstructor;
8 | import lombok.Getter;
9 | import webhook.teamcity.settings.project.WebHookParameter;
10 |
11 | @Getter @AllArgsConstructor
12 | public class ProjectParametersBean {
13 |
14 | SProject project;
15 | List parameterList;
16 |
17 | public static ProjectParametersBean newInstance(SProject project, List parameters) {
18 | if (parameters != null) {
19 | return new ProjectParametersBean(project, parameters);
20 | } else {
21 | return new ProjectParametersBean(project, new ArrayList<>());
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/ProjectTemplatesBean.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | import jetbrains.buildServer.serverSide.SProject;
7 | import lombok.AllArgsConstructor;
8 | import lombok.Getter;
9 | import webhook.teamcity.payload.WebHookPayloadTemplate;
10 |
11 | @Getter @AllArgsConstructor
12 | public class ProjectTemplatesBean {
13 |
14 | SProject project;
15 | List templateList;
16 |
17 | public static ProjectTemplatesBean newInstance(SProject project, List templates) {
18 | if (templates != null) {
19 | return new ProjectTemplatesBean(project, templates);
20 | } else {
21 | return new ProjectTemplatesBean(project, new ArrayList<>());
22 | }
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/ProjectWebHookParameterBean.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import jetbrains.buildServer.serverSide.SProject;
4 | import lombok.AllArgsConstructor;
5 | import lombok.Getter;
6 | import webhook.CommonUtils;
7 | import webhook.teamcity.settings.project.WebHookParameter;
8 |
9 | @Getter
10 | @AllArgsConstructor
11 | public class ProjectWebHookParameterBean {
12 | SProject sproject;
13 | WebHookParameter parameter;
14 |
15 | public String getSensibleProjectFullName() {
16 | return CommonUtils.getSensibleProjectFullName(getSproject());
17 | }
18 |
19 | public String getSensibleProjectName() {
20 | return CommonUtils.getSensibleProjectName(getSproject());
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/ProjectWebHooksBeanGsonSerialiser.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.GsonBuilder;
5 |
6 | import webhook.teamcity.extension.bean.TemplatesAndProjectWebHooksBean.TemplatesAndProjectWebHooksBeanResponseWrapper;
7 | import webhook.teamcity.extension.util.ProjectHistoryResolver.ProjectHistoryBean;
8 |
9 | public class ProjectWebHooksBeanGsonSerialiser {
10 | private ProjectWebHooksBeanGsonSerialiser(){}
11 |
12 | public static String serialise(TemplatesAndProjectWebHooksBeanResponseWrapper project){
13 | Gson gson = new GsonBuilder().setPrettyPrinting().create();
14 | return gson.toJson(project);
15 | }
16 | public static String serialise(ProjectHistoryBean project){
17 | Gson gson = new GsonBuilder().setPrettyPrinting().create();
18 | return gson.toJson(project);
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/StateBean.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @AllArgsConstructor @Getter
7 | public class StateBean{
8 | private String buildStateName;
9 | private boolean enabled;
10 | }
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/WebHookTestHistoryItem.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Builder;
5 | import lombok.Getter;
6 | import lombok.NoArgsConstructor;
7 |
8 | @Getter
9 | @Builder
10 | @NoArgsConstructor
11 | @AllArgsConstructor
12 | public class WebHookTestHistoryItem {
13 |
14 | String dateTime;
15 | ErrorStatus error;
16 | String trackingId;
17 | String url;
18 | String executionTime;
19 | int statusCode;
20 |
21 | String statusReason;
22 |
23 | @Getter @NoArgsConstructor @AllArgsConstructor
24 | public static class ErrorStatus {
25 | String message;
26 | int errorCode;
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/WebhookAuthenticationConfigBean.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean;
2 |
3 | import webhook.teamcity.auth.WebHookAuthConfig;
4 |
5 | public class WebhookAuthenticationConfigBean extends WebHookAuthConfig {
6 |
7 | public static WebhookAuthenticationConfigBean build(WebHookAuthConfig config){
8 | WebhookAuthenticationConfigBean bean = new WebhookAuthenticationConfigBean();
9 | bean.setType(config.getType());
10 | bean.setPreemptive(config.getPreemptive());
11 | bean.getParameters().putAll(config.getParameters());
12 | return bean;
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/extension/bean/template/RegisteredWebHookTemplateBeanGsonSerialiser.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.extension.bean.template;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.GsonBuilder;
5 |
6 | public class RegisteredWebHookTemplateBeanGsonSerialiser {
7 |
8 | private RegisteredWebHookTemplateBeanGsonSerialiser(){}
9 |
10 | public static String serialise(RegisteredWebHookTemplateBean templates){
11 | Gson gson = new GsonBuilder().setPrettyPrinting().create();
12 | return gson.toJson(templates);
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/json/WebHookBuildStateJson.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.json;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Data;
5 | import lombok.NoArgsConstructor;
6 | import webhook.teamcity.BuildStateEnum;
7 |
8 | @Data @NoArgsConstructor @AllArgsConstructor
9 | public class WebHookBuildStateJson {
10 |
11 | private BuildStateEnum type;
12 | private boolean enabled;
13 | }
14 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/json/WebHookBuildTypesJson.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.json;
2 |
3 | import java.util.Set;
4 |
5 | import lombok.AllArgsConstructor;
6 | import lombok.Data;
7 | import lombok.NoArgsConstructor;
8 |
9 | @Data @AllArgsConstructor @NoArgsConstructor
10 | public class WebHookBuildTypesJson {
11 | private boolean allEnabled;
12 | private boolean subProjectsEnabled;
13 | private Set id;
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/json/WebHookConfigurationGsonBuilder.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.json;
2 |
3 | import com.google.gson.Gson;
4 | import com.google.gson.GsonBuilder;
5 |
6 | import webhook.teamcity.BuildStateEnum;
7 |
8 | public class WebHookConfigurationGsonBuilder {
9 |
10 | private WebHookConfigurationGsonBuilder() {}
11 |
12 | public static Gson gsonBuilder() {
13 | return new GsonBuilder()
14 | .registerTypeAdapter(BuildStateEnum.class, new BuildStateEnumTypeAdaptor())
15 | .enableComplexMapKeySerialization()
16 | .setPrettyPrinting()
17 | .create();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/json/WebHookConfigurationListWrapper.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.json;
2 |
3 | import lombok.Data;
4 |
5 | @Data
6 | public abstract class WebHookConfigurationListWrapper {
7 | private int count;
8 | }
9 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/json/WebHookFilterJson.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.json;
2 |
3 | import java.util.List;
4 |
5 | import lombok.AllArgsConstructor;
6 | import lombok.Data;
7 | import lombok.EqualsAndHashCode;
8 | import lombok.NoArgsConstructor;
9 |
10 | @Data @NoArgsConstructor
11 | @EqualsAndHashCode(callSuper = true)
12 | public class WebHookFilterJson extends WebHookConfigurationListWrapper {
13 | private List filter;
14 |
15 | @Data @AllArgsConstructor @NoArgsConstructor
16 | public static class Filter {
17 | private Integer id;
18 | private String value;
19 | private String regex;
20 | private Boolean enabled;
21 | }
22 |
23 | public static WebHookFilterJson create(List filters) {
24 | WebHookFilterJson webHookFilter = new WebHookFilterJson();
25 | webHookFilter.setFilter(filters);
26 | webHookFilter.setCount(filters.size());
27 | return webHookFilter;
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/java/webhook/teamcity/json/WebHookHeaderJson.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.json;
2 |
3 | import java.util.List;
4 |
5 | import lombok.AllArgsConstructor;
6 | import lombok.Data;
7 | import lombok.EqualsAndHashCode;
8 | import lombok.NoArgsConstructor;
9 |
10 | @Data @NoArgsConstructor
11 | @EqualsAndHashCode(callSuper = true)
12 | public class WebHookHeaderJson extends WebHookConfigurationListWrapper {
13 | private List header;
14 |
15 | @Data @AllArgsConstructor @NoArgsConstructor
16 | public static class Header {
17 | private Integer id;
18 | private String name;
19 | private String value;
20 | }
21 |
22 | public static WebHookHeaderJson create(List headers) {
23 | WebHookHeaderJson webHookFilter = new WebHookHeaderJson();
24 | webHookFilter.setHeader(headers);
25 | webHookFilter.setCount(headers.size());
26 | return webHookFilter;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/ace-extras/mode/jsonvelocity.js:
--------------------------------------------------------------------------------
1 | define(function(require, exports, module) {
2 | "use strict";
3 |
4 | var oop = require("../lib/oop");
5 | var JsonMode = require("./json").Mode;
6 | var JsonVelocityHighlightRules = require("./jsonvelocity_highlight_rules").JsonVelocityHighlightRules;
7 | var FoldMode = require("./folding/velocity").FoldMode;
8 |
9 | var Mode = function() {
10 | JsonMode.call(this);
11 | this.HighlightRules = JsonVelocityHighlightRules;
12 | this.foldingRules = new FoldMode();
13 | };
14 | oop.inherits(Mode, JsonMode);
15 |
16 | (function() {
17 | this.lineCommentStart = "##";
18 | this.blockComment = {start: "#*", end: "*#"};
19 | this.$id = "ace/mode/jsonvelocity";
20 | }).call(Mode.prototype);
21 |
22 | exports.Mode = Mode;
23 | });
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/ext-error_marker.js:
--------------------------------------------------------------------------------
1 | ;
2 | (function() {
3 | ace.require(["ace/ext/error_marker"], function() {});
4 | })();
5 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/ext-linking.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var t=e.editor,n=e.getAccelKey();if(n){var t=e.editor,r=e.getDocumentPosition(),i=t.session,s=i.getTokenAt(r.row,r.column);t._emit("linkHover",{position:r,token:s})}}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("ace/editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}})});
2 | (function() {
3 | ace.require(["ace/ext/linking"], function() {});
4 | })();
5 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/mode-plain_text.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./behaviour").Behaviour,u=function(){this.HighlightRules=s,this.$behaviour=new o};r.inherits(u,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return""},this.$id="ace/mode/plain_text"}.call(u.prototype),t.Mode=u})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/mode-text.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/mode-text.js
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/abap.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/abap",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="abap"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/ada.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/ada",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ada"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/apache_conf.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/apache_conf",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="apache_conf"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/applescript.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/applescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="applescript"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/asciidoc.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/asciidoc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="asciidoc"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/assembly_x86.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/assembly_x86",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="assembly_x86"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/autohotkey.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/autohotkey",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="autohotkey"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/batchfile.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/batchfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="batchfile"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/bro.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/bro",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/c9search.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/c9search",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="c9search"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/cirru.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/cirru",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="cirru"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/cobol.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/cobol",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="cobol"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/coldfusion.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/coldfusion",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="coldfusion"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/csharp.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/csharp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="csharp"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/curly.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/curly",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="curly"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/d.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/d",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="d"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/diff.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/diff",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\nsnippet header DEP-3 style header\n Description: ${1}\n Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n Bug: ${4:url in upstream bugtracker}\n Forwarded: ${5:no|not-needed|url}\n Author: ${6:`g:snips_author`}\n Reviewed-by: ${7:name and email}\n Last-Update: ${8:`strftime("%Y-%m-%d")`}\n Applied-Upstream: ${9:upstream version|url|commit}\n\n',t.scope="diff"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/dockerfile.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/dockerfile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dockerfile"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/dot.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/dot",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="dot"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/drools.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/drools",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='\nsnippet rule\n rule "${1?:rule_name}"\n when\n ${2:// when...} \n then\n ${3:// then...}\n end\n\nsnippet query\n query ${1?:query_name}\n ${2:// find} \n end\n \nsnippet declare\n declare ${1?:type_name}\n ${2:// attributes} \n end\n\n',t.scope="drools"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/eiffel.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/eiffel",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="eiffel"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/ejs.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/ejs",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ejs"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/elixir.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/elm.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/elm",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="elm"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/forth.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/forth",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="forth"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/fortran.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/fortran",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="fortran"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/ftl.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/ftl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ftl"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/gcode.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/gcode",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gcode"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/gherkin.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/gherkin",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gherkin"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/gitignore.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/gitignore",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="gitignore"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/glsl.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/glsl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="glsl"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/gobstones.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/gobstones",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# Procedure\nsnippet proc\n procedure ${1?:name}(${2:argument}) {\n ${3:// body...}\n }\n\n# Function\nsnippet fun\n function ${1?:name}(${2:argument}) {\n return ${3:// body...}\n }\n\n# Repeat\nsnippet rep\n repeat ${1?:times} {\n ${2:// body...}\n }\n\n# For\nsnippet for\n foreach ${1?:e} in ${2?:list} {\n ${3:// body...} \n }\n\n# If\nsnippet if\n if (${1?:condition}) {\n ${3:// body...} \n }\n\n# While\n while (${1?:condition}) {\n ${2:// body...} \n }\n",t.scope="gobstones"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/golang.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/golang",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="golang"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/groovy.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/groovy",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="groovy"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/haml.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/haml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet t\n %table\n %tr\n %th\n ${1:headers}\n %tr\n %td\n ${2:headers}\nsnippet ul\n %ul\n %li\n ${1:item}\n %li\nsnippet =rp\n = render :partial => '${1:partial}'\nsnippet =rpl\n = render :partial => '${1:partial}', :locals => {}\nsnippet =rpc\n = render :partial => '${1:partial}', :collection => @$1\n\n",t.scope="haml"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/handlebars.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="handlebars"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/haskell_cabal.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/haskell_cabal",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="haskell_cabal"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/haxe.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/haxe",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="haxe"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/hjson.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/hjson",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/html_elixir.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/html_elixir",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="html_elixir"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/html_ruby.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/html_ruby",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="html_ruby"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/ini.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/ini",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ini"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/jack.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/jack",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jack"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/jade.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/jade",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jade"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/json.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/jsonvelocity.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/jsonvelocity",["require","exports","module"], function(require, exports, module) {
2 | "use strict";
3 |
4 | exports.snippetText =undefined;
5 | exports.scope = "jsonvelocity";
6 |
7 | }); (function() {
8 | ace.require(["ace/snippets/jsonvelocity"], function(m) {
9 | if (typeof module == "object" && typeof exports == "object" && module) {
10 | module.exports = m;
11 | }
12 | });
13 | })();
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/jsx.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/jsx",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="jsx"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/julia.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/julia",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="julia"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/kotlin.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/kotlin",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/latex.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/latex",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="latex"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/lean.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/lean",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lean"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/less.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/less",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="less"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/liquid.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/liquid",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="liquid"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/lisp.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/lisp",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lisp"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/live_script.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/live_script",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/livescript.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/livescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="livescript"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/logiql.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/logiql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="logiql"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/lua.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/lua",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet #!\n #!/usr/bin/env lua\n $1\nsnippet local\n local ${1:x} = ${2:1}\nsnippet fun\n function ${1:fname}(${2:...})\n ${3:-- body}\n end\nsnippet for\n for ${1:i}=${2:1},${3:10} do\n ${4:print(i)}\n end\nsnippet forp\n for ${1:i},${2:v} in pairs(${3:table_name}) do\n ${4:-- body}\n end\nsnippet fori\n for ${1:i},${2:v} in ipairs(${3:table_name}) do\n ${4:-- body}\n end\n",t.scope="lua"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/luapage.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/luapage",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="luapage"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/lucene.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/lucene",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="lucene"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/makefile.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/makefile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet ifeq\n ifeq (${1:cond0},${2:cond1})\n ${3:code}\n endif\n",t.scope="makefile"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/mask.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/mask",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mask"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/matlab.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/matlab",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="matlab"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/maze.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/maze",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet >\ndescription assignment\nscope maze\n -> ${1}= ${2}\n\nsnippet >\ndescription if\nscope maze\n -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n",t.scope="maze"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/mel.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/mel",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mel"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/mips_assembler.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/mips_assembler",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mips_assembler"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/mipsassembler.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/mipsassembler",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/mushcode.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/mushcode",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mushcode"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/mysql.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/mysql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="mysql"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/nix.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/nix",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="nix"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/nsis.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/nsis",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope=""})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/objectivec.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/objectivec",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="objectivec"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/ocaml.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/ocaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="ocaml"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/pascal.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/pascal",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pascal"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/pgsql.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/pgsql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="pgsql"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/plain_text.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/plain_text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="plain_text"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/powershell.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/powershell",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="powershell"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/praat.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/praat",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="praat"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/prolog.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/prolog",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="prolog"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/properties.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/protobuf.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/protobuf",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="",t.scope="protobuf"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/razor.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/razor",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet if\n(${1} == ${2}) {\n ${3}\n}",t.scope="razor"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/rdoc.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/rdoc",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rdoc"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/rhtml.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/rhtml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rhtml"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/rst.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/rst",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# rst\n\nsnippet :\n :${1:field name}: ${2:field body}\nsnippet *\n *${1:Emphasis}*\nsnippet **\n **${1:Strong emphasis}**\nsnippet _\n \\`${1:hyperlink-name}\\`_\n .. _\\`$1\\`: ${2:link-block}\nsnippet =\n ${1:Title}\n =====${2:=}\n ${3}\nsnippet -\n ${1:Title}\n -----${2:-}\n ${3}\nsnippet cont:\n .. contents::\n \n",t.scope="rst"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/rust.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/rust",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="rust"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/sass.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/sass",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="sass"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/scad.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/scad",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scad"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/scala.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/scala",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scala"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/scheme.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/scheme",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scheme"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/scss.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/scss",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="scss"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/sjs.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/sjs",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="sjs"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/smarty.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/smarty",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="smarty"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/snippets.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/snippets",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="# snippets for making snippets :)\nsnippet snip\n snippet ${1:trigger}\n ${2}\nsnippet msnip\n snippet ${1:trigger} ${2:description}\n ${3}\nsnippet v\n {VISUAL}\n",t.scope="snippets"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/soy_template.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/soy_template",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="soy_template"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/space.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/space",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="space"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/stylus.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/stylus",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="stylus"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/svg.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/svg",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="svg"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/swift.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/swig.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/swig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swig"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/text.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/textile.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/textile",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Jekyll post header\nsnippet header\n ---\n title: ${1:title}\n layout: post\n date: ${2:date} ${3:hour:minute:second} -05:00\n ---\n\n# Image\nsnippet img\n !${1:url}(${2:title}):${3:link}!\n\n# Table\nsnippet |\n |${1}|${2}\n\n# Link\nsnippet link\n "${1:link text}":${2:url}\n\n# Acronym\nsnippet (\n (${1:Expand acronym})${2}\n\n# Footnote\nsnippet fn\n [${1:ref number}] ${3}\n\n fn$1. ${2:footnote}\n \n',t.scope="textile"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/toml.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/toml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="toml"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/tsx.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/tsx",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="tsx"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/twig.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/twig",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="twig"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/typescript.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/typescript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="typescript"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/vbscript.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/vbscript",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="vbscript"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/velocity.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/velocity",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# macro\nsnippet #macro\n #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n ${3:## macro code}\n #end\n# foreach\nsnippet #foreach\n #foreach ( ${1:\\$item} in ${2:\\$collection} )\n ${3:## foreach code}\n #end\n# if\nsnippet #if\n #if ( ${1:true} )\n ${0}\n #end\n# if ... else\nsnippet #ife\n #if ( ${1:true} )\n ${2}\n #else\n ${0}\n #end\n#import\nsnippet #import\n #import ( "${1:path/to/velocity/format}" )\n# set\nsnippet #set\n #set ( $${1:var} = ${0} )\n',t.scope="velocity",t.includeScopes=["html","javascript","css"]})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/verilog.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/verilog",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="verilog"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/vhdl.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/vhdl",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="vhdl"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/xml.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/xml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="xml"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/3rd-party/ace-editor/src-min-noconflict/snippets/yaml.js:
--------------------------------------------------------------------------------
1 | ace.define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="yaml"})
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/ajaxEdit.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2 | <%@page contentType="text/xml" %>
3 | ${messages}
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/css/mocha.css:
--------------------------------------------------------------------------------
1 |
2 | main#main-content-tag div#mocha ul#mocha-stats {
3 | position: relative;
4 | }
5 |
6 | main#main-content-tag div#mocha ul#mocha-stats li.progress canvas {
7 | display: none;
8 | }
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/editWebHook.jsp:
--------------------------------------------------------------------------------
1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
2 | <%@page contentType="application/json" %>
3 | ${content}
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/editWebHookRunnerParams.jsp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/editWebHookRunnerParams.jsp
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/js/admin-chart.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/js/admin-chart.js
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/js/noRestApi.js:
--------------------------------------------------------------------------------
1 | WebHooksPlugin.NoRestApi = {
2 | NoRestApiDialog: OO.extend(BS.AbstractWebForm, OO.extend(BS.AbstractModalDialog, {
3 | getContainer: function () {
4 | return $('noRestApiDialog');
5 | },
6 |
7 | formElement: function () {
8 | return $('noRestApiForm');
9 | },
10 |
11 | showDialog: function () {
12 | this.showCentered();
13 | }
14 |
15 | }))
16 | };
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "target": "es6"
5 | },
6 | "include": [
7 | "js/*.js",
8 | "js/tests/*.js",
9 | "3rd-party/**/*.js"
10 | ],
11 | "exclude": [
12 | "js/editWebHook.js",
13 | "js/editWebhookConfiguration-old.js"
14 | ]
15 | }
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/settingsList.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="application/json;charset=UTF-8" language="java" session="true" errorPage="/runtimeError.jsp"
2 | %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
3 | %><%@ taglib prefix="bs" tagdir="/WEB-INF/tags" %>
4 | ${projectWebHooksAsJson}
5 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/templateRendering.jsp:
--------------------------------------------------------------------------------
1 | <%@ page contentType="application/json;charset=UTF-8" language="java" session="true" errorPage="/runtimeError.jsp"
2 | %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
3 | %><%@ taglib prefix="bs" tagdir="/WEB-INF/tags" %>
4 | ${templateRendering}
5 |
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/viewWebHookRunnerParams.jsp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tcplugins/tcWebHooks/a37a70c50554aa696f8f05540bc2c57510e37a3f/tcwebhooks-web-ui/src/main/resources/buildServerResources/WebHook/viewWebHookRunnerParams.jsp
--------------------------------------------------------------------------------
/tcwebhooks-web-ui/src/test/java/webhook/teamcity/endpoint/WebHookEndPointViewerControllerTest.java:
--------------------------------------------------------------------------------
1 | package webhook.teamcity.endpoint;
2 |
3 | import static org.junit.Assert.*;
4 | import static webhook.teamcity.payload.util.StringUtils.stripTrailingSlash;
5 | import org.junit.Test;
6 |
7 |
8 | public class WebHookEndPointViewerControllerTest {
9 |
10 | @Test
11 | public void testStripTrailingSlash() {
12 | assertEquals("blah", stripTrailingSlash("blah/"));
13 | assertEquals("blah", stripTrailingSlash("blah"));
14 | assertEquals("blah/blah", stripTrailingSlash("blah/blah/"));
15 | assertEquals("blah/blah", stripTrailingSlash("blah/blah"));
16 | assertEquals("/blah/blah", stripTrailingSlash("/blah/blah/"));
17 | assertEquals("/blah/blah", stripTrailingSlash("/blah/blah"));
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------