/** * Parses single person notation provided via {@link org.shipkit.gradle.configuration.ShipkitConfiguration.Team#getDevelopers()} * and {@link org.shipkit.gradle.configuration.ShipkitConfiguration.Team#getContributors()} */ public static TeamMember parsePerson(String notation) throws InvalidInput { notNull(notation, "Team member notation cannot be null"); String[] split = notation.split(":"); if (split.length != 2) { throw invalidInput(notation); } TeamMember person = new TeamMember(split[0], split[1]); if (person.gitHubUser.trim().isEmpty() || person.name.trim().isEmpty()) { throw invalidInput(notation); } return person; }
/** * Parses single person notation provided via {@link org.shipkit.gradle.configuration.ShipkitConfiguration.Team#getDevelopers()} * and {@link org.shipkit.gradle.configuration.ShipkitConfiguration.Team#getContributors()} */ public static TeamMember parsePerson(String notation) throws InvalidInput { notNull(notation, "Team member notation cannot be null"); String[] split = notation.split(":"); if (split.length != 2) { throw invalidInput(notation); } TeamMember person = new TeamMember(split[0], split[1]); if (person.gitHubUser.trim().isEmpty() || person.name.trim().isEmpty()) { throw invalidInput(notation); } return person; }
/** * Parses single person notation provided via {@link ReleaseConfiguration.Team#getDevelopers()} * and {@link ReleaseConfiguration.Team#getContributors()} */ public static TeamMember parsePerson(String notation) throws InvalidInput { notNull(notation, "Team member notation cannot be null"); String[] split = notation.split(":"); if (split.length != 2) { throw invalidInput(notation); } TeamMember person = new TeamMember(split[0], split[1]); if (person.gitHubUser.trim().isEmpty() || person.name.trim().isEmpty()) { throw invalidInput(notation); } return person; }