Skip to content
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: Patch source of ci material api #3661

Merged
merged 8 commits into from
Jul 27, 2023
Merged

feat: Patch source of ci material api #3661

merged 8 commits into from
Jul 27, 2023

Conversation

avdhesh-devtron
Copy link
Contributor

@avdhesh-devtron avdhesh-devtron commented Jul 20, 2023

Feat : Patch source of ci material api

Description

Adding a new API, /ci-pipeline/patch-branch which can be used to change the source of a ci_material.

Fixes #
Manual testing
Units tests

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


func (impl CiCdPipelineOrchestratorImpl) PatchCiMaterialSource(ciPipeline *bean.CiPipeline, userId int32) (*bean.CiPipeline, error) {
oldPipeline, err := impl.ciPipelineRepository.FindById(ciPipeline.Id)
if err != nil {
return nil, err
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add error logs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added at handler level

vikramdevtron
vikramdevtron previously approved these changes Jul 24, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 34 Code Smells

No Coverage information No Coverage information
2.8% 2.8% Duplication

@@ -156,3 +155,53 @@ func InitClusterNoteService() {
configMapService := NewConfigMapServiceImpl(nil, nil, nil, util.MergeUtil{}, nil, configMapRepository, nil, nil, appRepository, nil, envRepository)
ciCdPipelineOrchestrator = NewCiCdPipelineOrchestrator(appRepository, logger, materialRepository, pipelineRepository, ciPipelineRepository, ciPipelineMaterialRepository, GitSensorClient, ciConfig, appWorkflowRepository, envRepository, attributesService, appListingRepository, appLabelsService, userAuthService, prePostCdScriptHistoryService, prePostCiScriptHistoryService, pipelineStageService, ciTemplateOverrideRepository, gitMaterialHistoryService, ciPipelineHistoryService, ciTemplateService, dockerArtifactStoreRepository, configMapService)
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this commented code

@vikramdevtron vikramdevtron merged commit 603dba0 into main Jul 27, 2023
@vikramdevtron vikramdevtron deleted the patch-branch-api branch July 27, 2023 08:40
@avdhesh-devtron avdhesh-devtron restored the patch-branch-api branch July 28, 2023 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants