-
Notifications
You must be signed in to change notification settings - Fork 4.6k
chore: added git controller layer #38446
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 1 commit
d18f3cd
3959aab
de5c867
43c6bae
3fa98cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package com.appsmith.server.git.controllers; | ||
|
|
||
| import com.appsmith.server.constants.Url; | ||
| import com.appsmith.server.git.autocommit.AutoCommitService; | ||
| import com.appsmith.server.git.central.CentralGitService; | ||
| import com.appsmith.server.git.utils.GitProfileUtils; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @Slf4j | ||
| @RestController | ||
| @RequestMapping(Url.GIT_APPLICATION_URL) | ||
| public class GitApplicationController extends GitApplicationControllerCE { | ||
|
|
||
| public GitApplicationController( | ||
| CentralGitService centralGitService, GitProfileUtils gitProfileUtils, AutoCommitService autoCommitService) { | ||
| super(centralGitService, gitProfileUtils, autoCommitService); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,226 @@ | ||||||||||||||||||||||||||||||
| package com.appsmith.server.git.controllers; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| import com.appsmith.external.dtos.GitBranchDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.external.dtos.GitRefDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.external.dtos.GitStatusDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.external.git.constants.ce.RefType; | ||||||||||||||||||||||||||||||
| import com.appsmith.external.views.Views; | ||||||||||||||||||||||||||||||
| import com.appsmith.git.dto.CommitDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.constants.ArtifactType; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.constants.FieldName; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.constants.Url; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.domains.Artifact; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.domains.GitArtifactMetadata; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.dtos.AutoCommitResponseDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.dtos.BranchProtectionRequestDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.dtos.GitConnectDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.dtos.GitPullDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.dtos.ResponseDTO; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.git.autocommit.AutoCommitService; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.git.central.CentralGitService; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.git.central.GitType; | ||||||||||||||||||||||||||||||
| import com.appsmith.server.git.utils.GitProfileUtils; | ||||||||||||||||||||||||||||||
| import com.fasterxml.jackson.annotation.JsonView; | ||||||||||||||||||||||||||||||
| import jakarta.validation.Valid; | ||||||||||||||||||||||||||||||
| import lombok.RequiredArgsConstructor; | ||||||||||||||||||||||||||||||
| import lombok.extern.slf4j.Slf4j; | ||||||||||||||||||||||||||||||
| import org.apache.commons.lang3.BooleanUtils; | ||||||||||||||||||||||||||||||
| import org.springframework.http.HttpStatus; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.DeleteMapping; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.PatchMapping; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.PathVariable; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.PostMapping; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.PutMapping; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.RequestBody; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.RequestHeader; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.RequestMapping; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.RequestParam; | ||||||||||||||||||||||||||||||
| import org.springframework.web.bind.annotation.ResponseStatus; | ||||||||||||||||||||||||||||||
| import reactor.core.publisher.Mono; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| import java.util.List; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @Slf4j | ||||||||||||||||||||||||||||||
| @RequestMapping(Url.GIT_APPLICATION_URL) | ||||||||||||||||||||||||||||||
| @RequiredArgsConstructor | ||||||||||||||||||||||||||||||
| public class GitApplicationControllerCE { | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| protected final CentralGitService centralGitService; | ||||||||||||||||||||||||||||||
| protected final GitProfileUtils gitProfileUtils; | ||||||||||||||||||||||||||||||
| protected final AutoCommitService autoCommitService; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| protected static final ArtifactType ARTIFACT_TYPE = ArtifactType.APPLICATION; | ||||||||||||||||||||||||||||||
| protected static final GitType GIT_TYPE = GitType.FILE_SYSTEM; | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView({Views.Metadata.class}) | ||||||||||||||||||||||||||||||
| @GetMapping("/{baseApplicationId}/metadata") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<GitArtifactMetadata>> getGitMetadata(@PathVariable String baseApplicationId) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .getGitArtifactMetadata(baseApplicationId, ARTIFACT_TYPE) | ||||||||||||||||||||||||||||||
| .map(metadata -> new ResponseDTO<>(HttpStatus.OK.value(), metadata, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PostMapping("/{applicationId}/connect") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<? extends Artifact>> connectApplicationToRemoteRepo( | ||||||||||||||||||||||||||||||
| @PathVariable String applicationId, | ||||||||||||||||||||||||||||||
| @RequestBody GitConnectDTO gitConnectDTO, | ||||||||||||||||||||||||||||||
| @RequestHeader("Origin") String originHeader) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .connectArtifactToGit(applicationId, gitConnectDTO, originHeader, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(application -> new ResponseDTO<>(HttpStatus.OK.value(), application, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PostMapping("/{branchedApplicationId}/commit") | ||||||||||||||||||||||||||||||
| @ResponseStatus(HttpStatus.CREATED) | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<String>> commit( | ||||||||||||||||||||||||||||||
| @RequestBody CommitDTO commitDTO, @PathVariable String branchedApplicationId) { | ||||||||||||||||||||||||||||||
| log.info("Going to commit branchedApplicationId {}", branchedApplicationId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .commitArtifact(commitDTO, branchedApplicationId, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.CREATED.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PostMapping("/{sourceApplicationId}/create-ref") | ||||||||||||||||||||||||||||||
| @ResponseStatus(HttpStatus.CREATED) | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<? extends Artifact>> createReference( | ||||||||||||||||||||||||||||||
| @PathVariable String sourceApplicationId, | ||||||||||||||||||||||||||||||
| @RequestHeader(name = FieldName.BRANCH_NAME, required = false) String srcBranch, | ||||||||||||||||||||||||||||||
| @RequestBody GitRefDTO gitRefDTO) { | ||||||||||||||||||||||||||||||
| log.info( | ||||||||||||||||||||||||||||||
| "Going to create a reference from sourceApplicationId {}, srcBranch {}", | ||||||||||||||||||||||||||||||
| sourceApplicationId, | ||||||||||||||||||||||||||||||
| srcBranch); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .createReference(sourceApplicationId, gitRefDTO, ArtifactType.APPLICATION, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.CREATED.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{referencedApplicationId}/checkout-ref") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<? extends Artifact>> checkoutReference( | ||||||||||||||||||||||||||||||
| @PathVariable String referencedApplicationId, @RequestBody GitRefDTO gitRefDTO) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .checkoutReference(referencedApplicationId, gitRefDTO, true, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.OK.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
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. GET request with a RequestBody is unexpected. -@GetMapping("/{referencedApplicationId}/checkout-ref")
-public Mono<ResponseDTO<? extends Artifact>> checkoutReference(
- @PathVariable String referencedApplicationId, @RequestBody GitRefDTO gitRefDTO) {
+@PostMapping("/{referencedApplicationId}/checkout-ref")
+public Mono<ResponseDTO<? extends Artifact>> checkoutReference(
+ @PathVariable String referencedApplicationId, @RequestBody GitRefDTO gitRefDTO) {📝 Committable suggestion
Suggested change
Contributor
Author
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. Thanks rabbit, really missed that!
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. @sondermanish You're welcome! Let me know if there's anything else you'd like to explore or adjust. |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PostMapping("/{branchedApplicationId}/disconnect") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<? extends Artifact>> disconnectFromRemote(@PathVariable String branchedApplicationId) { | ||||||||||||||||||||||||||||||
| log.info("Going to remove the remoteUrl for application {}", branchedApplicationId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .detachRemote(branchedApplicationId, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.OK.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{branchedApplicationId}/pull") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<GitPullDTO>> pull(@PathVariable String branchedApplicationId) { | ||||||||||||||||||||||||||||||
| log.info("Going to pull the latest for branchedApplicationId {}", branchedApplicationId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .pullArtifact(branchedApplicationId, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.OK.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{branchedApplicationId}/status") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<GitStatusDTO>> getStatus( | ||||||||||||||||||||||||||||||
| @PathVariable String branchedApplicationId, | ||||||||||||||||||||||||||||||
| @RequestParam(required = false, defaultValue = "true") Boolean compareRemote) { | ||||||||||||||||||||||||||||||
| log.info("Going to get status for branchedApplicationId {}", branchedApplicationId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .getStatus(branchedApplicationId, compareRemote, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.OK.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{referencedApplicationId}/fetch/remote") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<String>> fetchRemoteChanges( | ||||||||||||||||||||||||||||||
| @PathVariable String referencedApplicationId, | ||||||||||||||||||||||||||||||
| @RequestHeader(required = false, defaultValue = "branch") String refTypeString) { | ||||||||||||||||||||||||||||||
| log.info("Going to compare with remote for default referencedApplicationId {}", referencedApplicationId); | ||||||||||||||||||||||||||||||
| // TODO: check if we require refType fetching remote | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .fetchRemoteChanges(referencedApplicationId, true, ARTIFACT_TYPE, GIT_TYPE, RefType.BRANCH) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.OK.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @DeleteMapping("/{baseArtifactId}/ref") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<? extends Artifact>> deleteBranch( | ||||||||||||||||||||||||||||||
| @PathVariable String baseArtifactId, @RequestBody GitRefDTO gitRefDTO) { | ||||||||||||||||||||||||||||||
| log.info("Going to delete ref {} for baseApplicationId {}", gitRefDTO.getRefName(), baseArtifactId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .deleteGitReference(baseArtifactId, gitRefDTO, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(application -> new ResponseDTO<>(HttpStatus.OK.value(), application, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PutMapping("/{branchedApplicationId}/discard") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<? extends Artifact>> discardChanges(@PathVariable String branchedApplicationId) { | ||||||||||||||||||||||||||||||
| log.info("Going to discard changes for branchedApplicationId {}", branchedApplicationId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .discardChanges(branchedApplicationId, ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>((HttpStatus.OK.value()), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PostMapping("/{baseArtifactId}/branch/protected") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<List<String>>> updateProtectedBranches( | ||||||||||||||||||||||||||||||
| @PathVariable String baseArtifactId, | ||||||||||||||||||||||||||||||
| @RequestBody @Valid BranchProtectionRequestDTO branchProtectionRequestDTO) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .updateProtectedBranches(baseArtifactId, branchProtectionRequestDTO.getBranchNames(), ARTIFACT_TYPE) | ||||||||||||||||||||||||||||||
| .map(data -> new ResponseDTO<>(HttpStatus.OK.value(), data, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{baseArtifactId}/branch/protected") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<List<String>>> getProtectedBranches(@PathVariable String baseArtifactId) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .getProtectedBranches(baseArtifactId, ARTIFACT_TYPE) | ||||||||||||||||||||||||||||||
| .map(list -> new ResponseDTO<>(HttpStatus.OK.value(), list, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PostMapping("/{branchedApplicationId}/auto-commit") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<AutoCommitResponseDTO>> autoCommitApplication(@PathVariable String branchedApplicationId) { | ||||||||||||||||||||||||||||||
| return autoCommitService | ||||||||||||||||||||||||||||||
| .autoCommitApplication(branchedApplicationId) | ||||||||||||||||||||||||||||||
| .map(data -> new ResponseDTO<>(HttpStatus.OK.value(), data, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{baseApplicationId}/auto-commit/progress") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<AutoCommitResponseDTO>> getAutoCommitProgress( | ||||||||||||||||||||||||||||||
| @PathVariable String baseApplicationId, | ||||||||||||||||||||||||||||||
| @RequestHeader(name = FieldName.BRANCH_NAME, required = false) String branchName) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .getAutoCommitProgress(baseApplicationId, branchName, ARTIFACT_TYPE) | ||||||||||||||||||||||||||||||
| .map(data -> new ResponseDTO<>(HttpStatus.OK.value(), data, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @PatchMapping("/{baseArtifactId}/auto-commit/toggle") | ||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<Boolean>> toggleAutoCommitEnabled(@PathVariable String baseArtifactId) { | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .toggleAutoCommitEnabled(baseArtifactId, ARTIFACT_TYPE) | ||||||||||||||||||||||||||||||
| .map(data -> new ResponseDTO<>(HttpStatus.OK.value(), data, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| @JsonView(Views.Public.class) | ||||||||||||||||||||||||||||||
| @GetMapping("/{branchedApplicationId}/branch") | ||||||||||||||||||||||||||||||
|
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. should be plural, can handle later
Contributor
Author
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. done |
||||||||||||||||||||||||||||||
| public Mono<ResponseDTO<List<GitBranchDTO>>> branch( | ||||||||||||||||||||||||||||||
| @PathVariable String branchedApplicationId, | ||||||||||||||||||||||||||||||
| @RequestParam(required = false, defaultValue = "false") Boolean pruneBranches) { | ||||||||||||||||||||||||||||||
| log.debug("Going to get branch list for application {}", branchedApplicationId); | ||||||||||||||||||||||||||||||
| return centralGitService | ||||||||||||||||||||||||||||||
| .listBranchForArtifact( | ||||||||||||||||||||||||||||||
| branchedApplicationId, BooleanUtils.isTrue(pruneBranches), ARTIFACT_TYPE, GIT_TYPE) | ||||||||||||||||||||||||||||||
| .map(result -> new ResponseDTO<>(HttpStatus.OK.value(), result, null)); | ||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
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 Consider implementing pagination for branch listing. |
||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| package com.appsmith.server.git.controllers; | ||
|
|
||
| import com.appsmith.server.constants.Url; | ||
| import com.appsmith.server.git.central.CentralGitService; | ||
| import com.appsmith.server.git.utils.GitProfileUtils; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.web.bind.annotation.RequestMapping; | ||
| import org.springframework.web.bind.annotation.RestController; | ||
|
|
||
| @Slf4j | ||
| @RestController | ||
| @RequestMapping(Url.GIT_ARTIFACT_URL) | ||
| public class GitArtifactController extends GitArtifactControllerCE { | ||
|
|
||
| public GitArtifactController(CentralGitService centralGitService, GitProfileUtils gitProfileUtils) { | ||
| super(centralGitService, gitProfileUtils); | ||
| } | ||
| } |
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.
base or branched?
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.
done