-
Notifications
You must be signed in to change notification settings - Fork 370
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
JENKINS-64662 Create GitHub App Credentials Binding to support owner override #375
base: master
Are you sure you want to change the base?
Conversation
@bitwiseman @timja thoughts on this change? |
Really appreciate any feedback and steps to get this merged and released soon. Thank you! |
I have not updated this to deal with autoformatting. The steps needed:
|
@bitwiseman Thank you for the feedback and addressed it. |
cachedTokens = new ArrayList<>(); | ||
} else { | ||
Optional<AppInstallationToken> tempToken = | ||
cachedTokens.stream() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you are just going to keep one token wouldn't a Map make more sense and be more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried Map and changed it to List, I think I did that to avoid adding overrides to serialize/deserialize as this is transient field.
I think it is good to have that owner field with actual class just in case if we are going to use this token for future use cases across other classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried Map and changed it to List, I think I did that to avoid adding overrides to serialize/deserialize as this is transient field.
Not sure why this is a reason to use List instead of Map.
I think it is good to have that owner field with actual class just in case if we are going to use this token for future use cases across other classes.
I'm not sure what you mean here.
In my case this doesn't solve the underlying issue, in a multibranch pipeline job I would still need one credential per organization to do the repository scan. |
@bitwiseman Any other thoughts on this change?, looks like we have closed the other PR that carlossg proposed |
synchronized (this) { | ||
return cachedToken; | ||
return cachedTokens; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to other recent changes, we should look at using concurrent hash map instead.
Hi all, How can I help to get this merged and released? |
Not sure I see the point of this. You can already specify an owner…? |
Perhaps #527 covers your requirement. |
Description
Create GitHub App Credentials Binding to support owner override
See JENKINS-64662 for further information.
Submitter checklist
Reviewer checklist
Documentation changes
Users/aliases to notify
@bitwiseman @timja
Testing Results