Skip to content

[JENKINS-73388] Allow alternative implementation for GitHub App credentials#796

Merged
car-roll merged 2 commits into
jenkinsci:masterfrom
jeromepochat:JENKINS-73388-fields-encapsulation
Jul 17, 2024
Merged

[JENKINS-73388] Allow alternative implementation for GitHub App credentials#796
car-roll merged 2 commits into
jenkinsci:masterfrom
jeromepochat:JENKINS-73388-fields-encapsulation

Conversation

@jeromepochat
Copy link
Copy Markdown
Contributor

@jeromepochat jeromepochat commented Jul 9, 2024

This encapsulate fields making possible to extend GitHubAppCredentials to retrieve properties from an alternative storage instead of field values.

Pseudo code:

class AlternativeGitHubAppCredentials extends GitHubAppCredentials {

    @Override
    public getAppID() {
        return retrieveFromExternalSystem("appId");
    }

    @Override
    public getPrivateKey() {
        return retrieveFromExternalSystem("privateKey");
    }
}

See JENKINS-73388 for further information.

Copy link
Copy Markdown

@car-roll car-roll left a comment

Choose a reason for hiding this comment

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

LGTM

@car-roll car-roll merged commit 5a78598 into jenkinsci:master Jul 17, 2024
@jeromepochat jeromepochat deleted the JENKINS-73388-fields-encapsulation branch July 17, 2024 14:40
@jeromepochat jeromepochat restored the JENKINS-73388-fields-encapsulation branch July 17, 2024 14:40
@jeromepochat jeromepochat deleted the JENKINS-73388-fields-encapsulation branch July 17, 2024 14:40
clone.owner = owner;
new GitHubAppCredentials(getScope(), getId(), getDescription(), getAppID(), getPrivateKey());
clone.apiUri = getApiUri();
clone.owner = getOwner();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants