Commit f4d9d054 authored by Martin Lowe's avatar Martin Lowe 🇨🇦 Committed by Martin Lowe
Browse files

Revert "Update to bot checking logic to check for project and any matching email"

This reverts commit 070fad17.
parent 4d3e3e77
......@@ -16,8 +16,7 @@ import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import com.fasterxml.jackson.databind.JsonNode;
import org.eclipsefoundation.git.eca.model.BotUser;
/**
* Interface for interacting with the Eclipse Foundation Bots API.
......@@ -36,5 +35,5 @@ public interface BotsAPI {
*/
@GET
@Produces("application/json")
List<JsonNode> getBots();
List<BotUser> getBots();
}
/**
* Copyright (C) 2020 Eclipse Foundation
*
* <p>This program and the accompanying materials are made available under the terms of the Eclipse
* Public License 2.0 which is available at https://www.eclipse.org/legal/epl-2.0/
*
* <p>SPDX-License-Identifier: EPL-2.0
*/
package org.eclipsefoundation.git.eca.model;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Represents a bot user in the Eclipse API.
*
* @author Martin Lowe
*/
public class BotUser {
private String id;
private String projectId;
private String username;
private String email;
@JsonProperty("github.com")
private SiteSpecificBot githubBot;
@JsonProperty("gitlab.eclipse.org")
private SiteSpecificBot gitlabBot;
/** @return the id */
public String getId() {
return id;
}
/** @param id the id to set */
public void setId(String id) {
this.id = id;
}
/** @return the projectId */
public String getProjectId() {
return projectId;
}
/** @param projectId the projectId to set */
public void setProjectId(String projectId) {
this.projectId = projectId;
}
/** @return the username */
public String getUsername() {
return username;
}
/** @param username the username to set */
public void setUsername(String username) {
this.username = username;
}
/** @return the email */
public String getEmail() {
return email;
}
/** @return the githubBot */
public SiteSpecificBot getGithubBot() {
return githubBot;
}
/** @param githubBot the githubBot to set */
public void setGithubBot(SiteSpecificBot githubBot) {
this.githubBot = githubBot;
}
/** @return the gitlabBot */
public SiteSpecificBot getGitlabBot() {
return gitlabBot;
}
/** @param gitlabBot the gitlabBot to set */
public void setGitlabBot(SiteSpecificBot gitlabBot) {
this.gitlabBot = gitlabBot;
}
/** @param email the email to set */
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("BotUser [id=");
builder.append(id);
builder.append(", projectId=");
builder.append(projectId);
builder.append(", username=");
builder.append(username);
builder.append(", email=");
builder.append(email);
builder.append(", githubBot=");
builder.append(githubBot);
builder.append(", gitlabBot=");
builder.append(gitlabBot);
builder.append("]");
return builder.toString();
}
public static class SiteSpecificBot {
private String username;
private String email;
/** @return the username */
public String getUsername() {
return username;
}
/** @param username the username to set */
public void setUsername(String username) {
this.username = username;
}
/** @return the email */
public String getEmail() {
return email;
}
/** @param email the email to set */
public void setEmail(String email) {
this.email = email;
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment