Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(1079): integrate deploy keys features with auth and pipeline routes [5] #2157
feat(1079): integrate deploy keys features with auth and pipeline routes [5] #2157
Changes from all commits
eac6bdc
8ea65eb
070e7c6
8e5320d
7db30b5
2293cd6
8c02a17
d4cbc25
e8898b3
4727675
a05200a
a075490
371d072
d55ba14
fd87e14
9f11578
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This boolean check if scm, such as
github
has ability to doautoKeysGeneration
.What if such scm, say
bitbucket
does not have such feature andautoKeysGeneration = true
from the payload. How do we handle that case? Would there be:catch
blockautoKeysGeneration: true
, as well as check if given SCM has such ability.In UI, we can prevent user giving input for if scm does not have
autoKeysGeneration
feature, but we also need to sanitize and guard on API. I can see some power users would call this API directly.Just a thought, what do you think?
Note:
From: #1079 (comment)
If we apply this feature to all SCMs:
scm-github
,scm-bitbucket
, then we dont have such issue, just need to catch the errors.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.
Yeah I get the point. I didn't take the case of direct API calls.
Catch is definitely needed. And it will be handled by the not implemented promise rejection in scm base.
I am wondering if the 2nd point is needed because if
autoKeysGeneration
is set to true in the payload, it will be rejected in the addDeployKey method and eventually sent to the catch block.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.
Cool. I meant either 1) or 2).
Since handled that case in 1), 2) is no longer necessary
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.
alright cool 👍
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.
don't we already have a
catch
at end of Promise chain ?