const slug = almSpecificFields?.slug;
const monorepo = almSpecificFields?.monorepo ?? false;
+ if (!repository) {
+ return Promise.reject();
+ }
+
switch (alm) {
case AlmKeys.Azure: {
- if (!slug || !repository) {
+ if (!slug) {
return Promise.reject();
}
return setProjectAzureBinding({
});
}
case AlmKeys.BitbucketServer: {
- if (!repository || !slug) {
+ if (!slug) {
return Promise.reject();
}
return setProjectBitbucketBinding({
});
}
case AlmKeys.BitbucketCloud: {
- if (!repository) {
- return Promise.reject();
- }
return setProjectBitbucketCloudBinding({
almSetting,
project,
}
case AlmKeys.GitHub: {
// By default it must remain true.
- const summaryCommentEnabled =
- almSpecificFields?.summaryCommentEnabled === undefined
- ? true
- : almSpecificFields?.summaryCommentEnabled;
- if (!repository) {
- return Promise.reject();
- }
+ const summaryCommentEnabled = almSpecificFields?.summaryCommentEnabled ?? true;
return setProjectGithubBinding({
almSetting,
project,
}
case AlmKeys.GitLab: {
- if (!repository) {
- return Promise.reject();
- }
return setProjectGitlabBinding({
almSetting,
project,