Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jep-227 downstream usage #357

Merged
merged 2 commits into from
Nov 1, 2023
Merged

jep-227 downstream usage #357

merged 2 commits into from
Nov 1, 2023

Conversation

Vlatombe
Copy link
Member

@Vlatombe Vlatombe commented Oct 26, 2023

See JENKINS-XXXXX.

Proposed changelog entries

  • Entry 1: Issue, Human-readable Text
  • ...

Submitter checklist

  • JIRA issue is well described
  • Changelog entry appropriate for the audience affected by the change (users or developer, depending on the change).
    * Use the Internal: prefix if the change has no user-visible impact (API, test frameworks, etc.)
  • Appropriate autotests or explanation to why this change has no tests

@Vlatombe Vlatombe changed the title jep-227 downstream API usage jep-227 downstreamusage Oct 26, 2023
@Vlatombe Vlatombe changed the title jep-227 downstreamusage jep-227 downstream usage Oct 26, 2023
Comment on lines -110 to -112
public <C extends Credentials> List<C> getCredentials(@NonNull Class<C> type, @Nullable ItemGroup itemGroup,
@Nullable Authentication authentication) {
return getCredentials(type, itemGroup, authentication, Collections.emptyList());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fewer overloads to deal with 👍

@Nullable Authentication authentication,
@NonNull List<DomainRequirement> domainRequirements) {
if (item instanceof AbstractFolder) {
// credentials defined in the folder should be available in the context of the folder
return getCredentials(type, (ItemGroup) item, authentication, domainRequirements);
return getCredentialsInItemGroup(type, (ItemGroup) item, authentication, domainRequirements);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clearer 👍

Comment on lines -86 to +85
CredentialsProvider.lookupCredentials(StandardUsernamePasswordCredentials.class, (ItemGroup) f,
ACL.SYSTEM, Collections.emptyList());
CredentialsProvider.lookupCredentialsInItemGroup(StandardUsernamePasswordCredentials.class, f,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no cast needed for method resolution 👍

pom.xml Outdated Show resolved Hide resolved
@jglick jglick marked this pull request as ready for review November 1, 2023 21:24
@jglick jglick requested a review from a team as a code owner November 1, 2023 21:24
@jglick jglick enabled auto-merge November 1, 2023 21:24
@jglick jglick merged commit d9b2c84 into jenkinsci:master Nov 1, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants