-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
chore: reference lifecycle #38174
chore: reference lifecycle #38174
Changes from all commits
9e090e7
7d556ed
e74219c
21933b8
4cd584f
a7b8606
9f2f3bc
592833e
f5dcc3f
73a48ae
376d3ba
804ed27
fe1648a
5cf5026
03a3843
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.appsmith.external.dtos; | ||
|
||
import com.appsmith.external.git.constants.ce.RefType; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class GitRefDTO { | ||
|
||
String refName; | ||
|
||
RefType refType; | ||
|
||
boolean isDefault; | ||
|
||
boolean createdFromLocal; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.appsmith.external.git.constants.ce; | ||
|
||
public enum RefType { | ||
BRANCH, | ||
TAG | ||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
package com.appsmith.server.git.central; | ||
|
||
import com.appsmith.external.dtos.GitRefDTO; | ||
import com.appsmith.external.dtos.GitStatusDTO; | ||
import com.appsmith.external.git.constants.ce.RefType; | ||
import com.appsmith.git.dto.CommitDTO; | ||
import com.appsmith.server.constants.ArtifactType; | ||
import com.appsmith.server.constants.ce.RefType; | ||
import com.appsmith.server.domains.Artifact; | ||
import com.appsmith.server.dtos.ArtifactImportDTO; | ||
import com.appsmith.server.dtos.GitConnectDTO; | ||
|
@@ -37,4 +38,15 @@ Mono<String> fetchRemoteChanges( | |
|
||
Mono<GitStatusDTO> getStatus( | ||
String branchedArtifactId, boolean compareRemote, ArtifactType artifactType, GitType gitType); | ||
|
||
Mono<? extends Artifact> checkoutReference( | ||
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. Nit, should we not be able to make a DTO out of these params? 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. Yes, we can! 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. Will you be replacing usage in a separate PR? |
||
String referenceArtifactId, | ||
String referenceToBeCheckedOut, | ||
boolean addFileLock, | ||
ArtifactType artifactType, | ||
GitType gitType, | ||
RefType refType); | ||
|
||
Mono<? extends Artifact> createReference( | ||
String referencedArtifactId, GitRefDTO refDTO, ArtifactType artifactType, GitType gitType); | ||
} |
Large diffs are not rendered by default.
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.
🛠️ Refactor suggestion
Add field validation and documentation.
The fields would benefit from: