Initial commit of work
Not final, but represents ~90% completion state
Signed-off-by: Martin Lowe martin.lowe@eclipse-foundation.org
Merge request reports
Activity
Filter activity
51 <artifactId>quarkus-resteasy-jackson</artifactId> 52 </dependency> 53 <dependency> 54 <groupId>io.quarkus</groupId> 55 <artifactId>quarkus-rest-client</artifactId> 56 </dependency> 57 <dependency> 58 <groupId>com.github.scribejava</groupId> 59 <artifactId>scribejava-apis</artifactId> 60 <version>6.4.1</version> 61 </dependency> 62 <dependency> 63 <groupId>org.gitlab4j</groupId> 64 <artifactId>gitlab4j-api</artifactId> 65 <version>4.14.11</version> 66 </dependency> 38 if (c.getCommitter() == null || c.getCommitter().getMail() == null) { 39 valid = false; 40 } 41 42 return valid; 43 } 44 45 /** 46 * Retrieves the email address associated with a commit message. This is done by 47 * processing the body and parsing out the given footer knowing its format. 48 * 49 * @param c the commit to retrieve the signed off by footer for 50 * @return the email address in the Signed-off-by footer, or null if none could 51 * be found. 52 */ 53 public static String getSignedOffByEmail(Commit c) { 8 /** 9 * Contains helpers for processing commits. 10 * 11 * @author Martin Lowe 12 * 13 */ 14 public class CommitHelper { 15 private static final Pattern SIGNED_OFF_BY_FOOTER = Pattern.compile("Signed-off-by:(.*)<(.*@.*)>$"); 16 17 /** 18 * Validate the commits fields. 19 * 20 * @param c commit to validate 21 * @return true if valid, otherwise false 22 */ 23 public static boolean validateCommit(Commit c) { 54 } 55 // load the secrets file in 56 File f = new File(secretPath); 57 if (!f.exists() || !f.canRead()) { 58 LOGGER.error("File at path {} either does not exist or cannot be read", secretPath); 59 return this.secrets; 60 } 61 62 // read each of the lines of secret config that should be added 63 try (BufferedReader br = new BufferedReader(new FileReader(f))) { 64 Properties p = new Properties(); 65 p.load(br); 66 secrets.putAll((Map) p); 67 68 } catch (IOException e) { 69 LOGGER.error("Error while reading in secrets configuration file.", e); 54 } 55 // load the secrets file in 56 File f = new File(secretPath); 57 if (!f.exists() || !f.canRead()) { 58 LOGGER.error("File at path {} either does not exist or cannot be read", secretPath); 59 return this.secrets; 60 } 61 62 // read each of the lines of secret config that should be added 63 try (BufferedReader br = new BufferedReader(new FileReader(f))) { 64 Properties p = new Properties(); 65 p.load(br); 66 secrets.putAll((Map) p); 67 68 } catch (IOException e) { 69 LOGGER.error("Error while reading in secrets configuration file.", e);
Please register or sign in to reply