Search in sources :

Example 1 with BlueChangeSetEntry

use of io.jenkins.blueocean.rest.model.BlueChangeSetEntry in project blueocean-plugin by jenkinsci.

the class PipelineRunImpl method getChangeSet.

@Override
public Container<BlueChangeSetEntry> getChangeSet() {
    Map<String, BlueChangeSetEntry> m = new LinkedHashMap<>();
    int cnt = 0;
    for (ChangeLogSet<? extends Entry> cs : run.getChangeSets()) {
        for (ChangeLogSet.Entry e : cs) {
            cnt++;
            String id = e.getCommitId();
            if (id == null)
                id = String.valueOf(cnt);
            m.put(id, new ChangeSetResource(e, this));
        }
    }
    return Containers.fromResourceMap(getLink(), m);
}
Also used : ChangeLogSet(hudson.scm.ChangeLogSet) Entry(hudson.scm.ChangeLogSet.Entry) BlueChangeSetEntry(io.jenkins.blueocean.rest.model.BlueChangeSetEntry) ChangeSetResource(io.jenkins.blueocean.service.embedded.rest.ChangeSetResource) LinkedHashMap(java.util.LinkedHashMap)

Aggregations

ChangeLogSet (hudson.scm.ChangeLogSet)1 Entry (hudson.scm.ChangeLogSet.Entry)1 BlueChangeSetEntry (io.jenkins.blueocean.rest.model.BlueChangeSetEntry)1 ChangeSetResource (io.jenkins.blueocean.service.embedded.rest.ChangeSetResource)1 LinkedHashMap (java.util.LinkedHashMap)1