/** * Add a change log entry to the list (if it's not already there) with the * given file. * * @param entry a {@link ChangeSet}to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile}to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * Add a change log entry to the list (if it's not already there) with the * given file. * * @param entry a {@link ChangeSet}to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile}to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * Add a change log entry to the list (if it's not already there) with the * given file. * * @param entry a {@link ChangeSet}to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile}to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } // do not add if entry is out of date range if ( startDate != null && entry.getDate().before( startDate ) ) { return; } if ( endDate != null && entry.getDate().after( endDate ) ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * Add a change log entry to the list (if it's not already there) * with the given file. * * @param entry a {@link ChangeSet} to be added to the list if another * with the same key doesn't exist already. If the entry's author * is null, the entry wont be added * @param file a {@link ChangeFile} to be added to the entry */ private void addEntry( ChangeSet entry, ChangeFile file ) { // do not add if entry is not populated if ( entry.getAuthor() == null ) { return; } // do not add if entry is out of date range if ( startDate != null && entry.getDate().before( startDate ) ) { return; } if ( endDate != null && entry.getDate().after( endDate ) ) { return; } entry.addFile( file ); entries.add( entry ); }
/** * This method extracts the simple metadata such as revision, lastCommitTimestamp of the commit/hash, author of the commit * from the Changelog available in the SCM repository * @param scmUrl - the SCM url to get the SCM connection * @param workingDir - the Working Copy or Directory of the SCM repo * @return a {@link Map<ExtraManifestKeys,String>} of values extracted form the changelog, with Keys from {@link ExtraManifestKeys} * @throws IOException - any error that might occur while manipulating the SCM Changelog * @throws ScmException - other SCM related exceptions */ public Map<ExtraManifestKeys, String> getChangeLog(String scmUrl, File workingDir) throws IOException, ScmException { Map<ExtraManifestKeys, String> changeLogMap = new HashMap<>(); ScmRepository scmRepository = scmManager.makeScmRepository(scmUrl); ChangeLogScmResult scmResult = scmManager.changeLog(new ChangeLogScmRequest(scmRepository, new ScmFileSet(workingDir, "*"))); if (scmResult.isSuccess()) { List<ChangeSet> changeSetList = scmResult.getChangeLog().getChangeSets(); if (changeSetList != null && !changeSetList.isEmpty()) { //get the latest changelog ChangeSet changeSet = changeSetList.get(0); changeLogMap.put(ExtraManifestKeys.SCM_TYPE, getScmType(scmUrl)); changeLogMap.put(ExtraManifestKeys.SCM_REVISION, changeSet.getRevision()); changeLogMap.put(ExtraManifestKeys.LAST_COMMIT_TIMESTAMP, manifestTimestampFormat(changeSet.getDate())); changeLogMap.put(ExtraManifestKeys.SCM_AUTHOR, changeSet.getAuthor()); } } return changeLogMap; } }
comment += "\n[MAVEN]: Merged from " + currentChange.getAuthor(); comment += "\n[MAVEN]: " + currentChange.getDateFormatted(); comment += "\n[MAVEN]: " + currentChange.getComment();
change.setAuthor( scmChangeSet.getAuthor() );
change.setAuthor( scmChangeSet.getAuthor() );
change.setAuthor( scmChangeSet.getAuthor() );