Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,8 @@ public ACL getACL(@Nonnull AbstractItem item) {

@Nonnull
public ACL getACL(@Nonnull Job<?,?> job) {
if(job instanceof WorkflowJob && job.getProperty(BranchJobProperty.class) != null || job instanceof AbstractProject) {
GithubRequireOrganizationMembershipACL githubACL = (GithubRequireOrganizationMembershipACL) getRootACL();
return githubACL.cloneForProject(job);
} else {
return getRootACL();
}
GithubRequireOrganizationMembershipACL githubACL = (GithubRequireOrganizationMembershipACL) getRootACL();
return githubACL.cloneForProject(job);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,15 @@ private String getRepositoryName() {
String repositoryName = null;
String repoUrl = null;
Describable scm = null;

if (this.item instanceof WorkflowJob) {
WorkflowJob project = (WorkflowJob) item;
scm = project.getProperty(BranchJobProperty.class).getBranch().getScm();
WorkflowJob job = (WorkflowJob) item;

if(job.getProperty(BranchJobProperty.class) != null) {
scm = job.getProperty(BranchJobProperty.class).getBranch().getScm();
} else if (! job.getSCMs().isEmpty()) {
scm = job.getSCMs().iterator().next();
}
} else if (this.item instanceof MultiBranchProject) {
MultiBranchProject project = (MultiBranchProject) item;
scm = (SCMSource) project.getSCMSources().get(0);
Expand Down
Loading