-
Notifications
You must be signed in to change notification settings - Fork 4.7k
chore: Switching to ref types and names for git #38433
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
Changes from 3 commits
4f2d4e3
1cb3a96
c74700c
b36cb91
fdc86c7
f2690b4
5e2ad53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| package com.appsmith.external.git.constants.ce; | ||
|
|
||
| public enum RefType { | ||
| BRANCH, | ||
| TAG | ||
| branch, | ||
| tag | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -260,7 +260,8 @@ public Mono<Application> disconnectEntitiesOfBaseArtifact(Artifact baseArtifact) | |
| .flatMap(page -> newPageService.findById(page.getId(), null)) | ||
| .map(newPage -> { | ||
| newPage.setBaseId(newPage.getId()); | ||
| newPage.setBranchName(null); | ||
| newPage.setRefType(null); | ||
| newPage.setRefName(null); | ||
| return newPage; | ||
| }) | ||
| .collectList() | ||
|
|
@@ -272,7 +273,8 @@ public Mono<Application> disconnectEntitiesOfBaseArtifact(Artifact baseArtifact) | |
| .findByPageId(newPage.getId(), Optional.empty()) | ||
| .map(newAction -> { | ||
| newAction.setBaseId(newAction.getId()); | ||
| newAction.setBranchName(null); | ||
| newAction.setRefType(null); | ||
| newAction.setRefName(null); | ||
| return newAction; | ||
| }) | ||
| .collectList() | ||
|
|
@@ -284,7 +286,8 @@ public Mono<Application> disconnectEntitiesOfBaseArtifact(Artifact baseArtifact) | |
| .findByPageId(newPage.getId()) | ||
| .map(actionCollection -> { | ||
| actionCollection.setBaseId(actionCollection.getId()); | ||
| actionCollection.setBranchName(null); | ||
| actionCollection.setRefType(null); | ||
| actionCollection.setRefName(null); | ||
|
Comment on lines
+289
to
+290
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consolidate repetitive blocks. You're setting - newPage.setRefType(null);
- newPage.setRefName(null);
- newAction.setRefType(null);
- newAction.setRefName(null);
- actionCollection.setRefType(null);
- actionCollection.setRefName(null);
+ clearRefProperties(newPage);
+ clearRefProperties(newAction);
+ clearRefProperties(actionCollection);
|
||
| return actionCollection; | ||
| }) | ||
| .collectList() | ||
|
|
@@ -334,7 +337,7 @@ public Mono<Application> publishArtifactPostRefCreation( | |
| Artifact artifact, RefType refType, Boolean isPublishedManually) { | ||
| // TODO: create publish for ref type creation. | ||
| Application application = (Application) artifact; | ||
| if (RefType.TAG.equals(refType)) { | ||
| if (RefType.tag.equals(refType)) { | ||
| return Mono.just(application); | ||
| } | ||
|
|
||
|
|
||
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.
Where are you putting all these methods?
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.
They're not used, deleting what need not be modified