Commit Graph

417 Commits

Author SHA1 Message Date
Vikyath Harekal
31519b68d3 feat: [CDE-722]: Truncate gitspace config identifier to accommodate the unique identifier and -disk suffixes (#3667)
* feat: [CDE-722]: Truncate gitspace config name to accommodate the unique identifier and -disk suffixes
2025-04-11 12:59:41 +00:00
Marko Gaćeša
5e1b1b407e feat: [CODE-3279]: revert PR API (#3657)
* pass the patch filename as a param to git
* revert doesn't return conflict
* revert PR API
2025-04-10 11:16:55 +00:00
Atefeh Mohseni Ejiyeh
414ecae70b fix: [CODE-3501] condition check for unauthorized users in git and rest apis (#3658) 2025-04-09 22:02:58 +00:00
Darko Draskovic
8d7fc35548 fix: [CODE-3014]: Return 401 in case of unauthorized call without auth data (#3634)
* Remove IsAuthErr helper
* Merge remote-tracking branch 'origin/main' into dd/auth
* Fix registry tests
* Add IsAuthErr app api auth package
* Add hasAccess helper method
* Merge remote-tracking branch 'origin/main' into dd/auth
* Merge remote-tracking branch 'origin/main' into dd/auth
* Merge remote-tracking branch 'origin/main' into dd/auth
* Clean up controllers and handle anonymous in Check
* Return 401 in case of unauthorized call without auth data
2025-04-09 15:24:54 +00:00
Darko Draskovic
cc64066d9a fix: [CODE-1277]: Fix response pr ret val on target branch change not updated (#3639)
* Fix response pr ret val on target branch change not updated
2025-04-04 14:09:47 +00:00
Deepak Bhatt
205a25900f feat: [CDE-693]: mv message map to enum package (#3636)
* fix: [CDE-693]: mv message map to enum package
2025-04-04 12:04:27 +00:00
Marko Gaćeša
28f012c577 feat: [CODE-3450]: add pullreq count API (#3624)
* add pullreq count API
2025-04-04 10:46:19 +00:00
Deepak Bhatt
e7d7db57b4 feat: [CDE-693]: add gitspace events for delegate task submit and infra vm creation (#3616)
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into CDE-693
* feat: [CDE-693]: add new gitspace events
* feat: [CDE-693]: add gitspace events for delegate task submit and infra vm creation
2025-04-04 07:17:52 +00:00
Atefeh Mohseni Ejiyeh
3c22d6342a fix: [CODE-3455] return full content on raw api for non-lfs content (#3625) 2025-04-03 20:03:56 +00:00
Atefeh Mohseni Ejiyeh
d3261ebc20 feat: [CODE-2528]: Update raw and get-content APIs to download lfs objects (#3549) 2025-04-02 21:28:41 +00:00
Atefeh Mohseni Ejiyeh
88d1f60157 feat: [CODE-3406] Add lfs checks to git pre-receive objects processor (#3607) 2025-04-02 16:55:36 +00:00
Deepak Bhatt
edcad7b744 fix: [CDE-706]: add ip-config for generating pool identifier (#3612)
* fix: [CDE-706]: lint
* fix: [CDE-706]: add ip-config for generating pool identifier
2025-04-02 12:55:00 +00:00
Marko Gaćeša
444aafdb0b feat: [CODE-2947]: add user events and metric handlers (#3597) 2025-03-28 20:06:47 +00:00
Darko Draskovic
60a182e515 feat: [CODE-1277]: Add support for PR target branch change (#3579)
* Merge remote-tracking branch 'origin/main' into dd/change-target-branch
* Merge remote-tracking branch 'origin/main' into dd/change-target-branch
* Add openapi spec for opChangeTargetBranch
* Fix updateMergeData args
* Refactor ChangeTargetBranch to use verifyBranchExistence and git.GetRefPath
* Merge remote-tracking branch 'origin/main' into dd/change-target-branch
* Refactor instumentation and event payload
* Change instrumentation and event payload
* Add target-branch-changed event
* Get new merge base and clear merge related fields
* Merge remote-tracking branch 'origin/main' into dd/change-target-branch
* Merge remote-tracking branch 'origin/main' into dd/change-target-branch
* Add merge check to target branch change
* Merge remote-tracking branch 'origin/main' into dd/change-target-branch
* Add new PullReqActivityType and EventType for audit track
* Add support for PR target branch change
2025-03-28 16:04:15 +00:00
Darko Draskovic
cc2a63b797 feat: [CODE-3293]: Add create compound label activity on PR creation label assignments (#3603)
* Add PullRequestActivityLabelBase
* Merge remote-tracking branch 'origin/main' into dd/compound-label-activity
* Add create compound label activity on PR creation label assignments
2025-03-28 15:29:01 +00:00
Deepak Bhatt
d79d292d87 feat: [CDE-699]: modify infra provider create resource api (#3600)
* feat: [CDE-697]: make cpu, memory and network as empty if nil
* feat: [CDE-699]: add comment
* feat: [CDE-699]: modify infra provider create resource api
2025-03-28 10:21:54 +00:00
Johannes Batzill
91c4ccf3b7 fix: [CODE-3393]: Fix PR creation when no codeowner file exists for being adding as reviewers (#3583) 2025-03-21 03:37:39 +00:00
Johannes Batzill
9d5ceb0033 fix: [CODE-3379]: Remove PR author from default reviewer evaluation (#3578) 2025-03-20 19:33:56 +00:00
Darko Draskovic
07224c37de feat: [CODE-3352]: Add git pre-receive preprocessor (#3535)
* Replace map[string]string with []CommitInfo in FindCommitterMismatchOutput
* Merge remote-tracking branch 'origin/main' into dd/pre-preceive-preprocessor
* Merge remote-tracking branch 'origin/main' into dd/pre-preceive-preprocessor
* Add total to FindCommitterMismatchOutput
* Reuse changedRefs for only deleted branches on push check
* Merge remote-tracking branch 'origin/main' into dd/pre-preceive-preprocessor
* Fix typo commiter -> committer
* Rename listAllObjects in listGitObjDir and loop thru dirs outside listGitObjDir
* Use line with commiter prefix to find commiter email
* Merge remote-tracking branch 'origin/main' into dd/pre-preceive-preprocessor
* Merge remote-tracking branch 'origin/main' into dd/pre-preceive-preprocessor
* Rename vars and add total to findOversizeFiles
* Use CatFileBatch instead of git show info to find commiter emails and remove unused CatFileBatchCheck
* Use WithAlternateObjectDirs in findCommiterEmailsMismatch
* Merge remote-tracking branch 'origin/mai
2025-03-18 20:21:28 +00:00
Marko Gaćeša
d708de0730 fix: [CODE-2947]: add posthog (#3528)
* changed the object-verb separator char
* change env var name for the PH API key
* add events for repo import and migrate
* rename pr "open" to "create""
* resolve pr comments
* add posthog
2025-03-18 11:31:51 +00:00
Dhruv Dhruv
b0de915ae2 feat: [CDE-669]: Integrating gitspaces and infra providers with delete spaces functionality. (#3558)
* Addressing review comments.
* Rebasing
* Removing reliance on space paths for gitspace service.
* feat: [CDE-669]: Integrating gitspaces and infra providers with soft delete spaces functionality.
2025-03-18 08:00:25 +00:00
Johannes Batzill
bcc9fc50f1 fix: [CODE-3338]: remove pr author from list of reviewers in activities (#3536) 2025-03-12 16:26:28 +00:00
Marko Gaćeša
f365ba6713 fix: [CODE-3272]: revert delete of source branch in merge git call (#3542)
* revert delete of source branch in merge git call
2025-03-12 14:48:32 +00:00
Atefeh Mohseni Ejiyeh
0a573a566c feat: [CODE-2528]: Support Git LFS (#3506)
* Apply suggestion from code review
* Merge branch 'feature/GitLFSv1' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into feature/GitLFSv1
* pr comments
* Apply suggestion from code review
* PR comments and lints
* lints
* pr comments
* self review-code cleaning
* feat: [CODE-2528]: implement gcs download func (#3505)
* revert ui changes that sneaked into my pr
* rely on repoCore
* merge main into feature branch
* fix: parsing LFS OIDs in git (#3470)
* Detect missing lfs objects on pre-receive (#3378)
* use principal type to generate token for remote auth (#3385)
* Revert "feat: [PIPE-24548]: Add label creation to pullreq creation (#3276)"

This reverts commit 6391117c6137a574934b9adb57b46ca7d7feaa19.
* feat: [CODE-2528] Git LFS Over SSH (#3279)
* feat: [PIPE-24548]: Add label creation to pullreq creation (#3276)

* Refactor label select base const and its use
* Add created labels to create pr response
* Merge remote-tracking branch 'origin/main' into dd
2025-03-11 21:14:13 +00:00
Tudor Macari
6da9821bc7 feat: [AH-933]: implement webhook execution (#3444)
* feat: [AH-933]: implement webhook execution
* feat: [AH-933]: implement webhook execution
2025-03-11 21:08:21 +00:00
Darko Draskovic
8e08be96fe fix: [CODE-3288]: Revert "Block any push that contains commits not committed by the user (#3512)" (#3532)
* Revert "feat: [CODE-3288]: Block any push that contains commits not committed by the user (#3512)"

This reverts commit 53000fe59d.
2025-03-10 16:49:41 +00:00
Darko Draskovic
53000fe59d feat: [CODE-3288]: Block any push that contains commits not committed by the user (#3512)
* Move output error init and error print outside of refupdates loop
* Merge remote-tracking branch 'origin/main' into dd/git-commiter
* Merge remote-tracking branch 'origin/main' into dd/git-commiter
* Merge remote-tracking branch 'origin/main' into dd/git-commiter
* Return commit sha email map and print user commiter mismatches
* Merge remote-tracking branch 'origin/main' into dd/git-commiter
* Move user commiter match check into separate func/file and add user_commiter_match setting
* Address empty repo push case
* Add GetBranchCommiterEmails func
* Add alt obj dirs to git GetCommit and getCommit
* Block any push that contains commits not committed by the user
2025-03-10 12:43:23 +00:00
Dhruv Dhruv
4d7c6addde feat: [CDE-660]: Adding support for listing and (soft) deleting infra provider configs. (#3502)
* Fixing gitspace instance state enum.
* feat: [CDE-660]: Adding support for listing and (soft) deleting infra provider configs.
2025-03-04 06:35:19 +00:00
Darko Draskovic
bb82438965 feat: [CODE-3278]: Add PR activity for reviewers that were added on PR creation (#3499)
* Reuse PullRequestActivityPayloadReviewerAdd and amend it with PrinciaplIDs
* Remove unused and redundant activity (sub)type
* Merge remote-tracking branch 'origin/main' into dd/pr-reviewer-creation-activity
* Replace store individual activity per reviewer added with store batch
* Add PR activity for reviewers that were added on PR creation
2025-03-03 16:07:01 +00:00
Karan Saraswat
50caca099f feat: [CODE-3205]: restrict importing duplicate repos while importing (#3471)
* feat: [CODE-3205]: restrict importing duplicating repos while importing
2025-03-02 04:55:16 +00:00
Atefeh Mohseni Ejiyeh
2480779cdc fix: [CODE-3249]: Silent not found error on delete git repository (#3477) 2025-03-01 01:55:35 +00:00
Darko Draskovic
cad0fbdf98 feat: [CODE-3256]: Add merge verify rule info related to minimum required approvals count for default reviewers (#3483)
* Merge remote-tracking branch 'origin/main' into dd/merge-verify-rules
* Replace princiapl ids with infos in merge verify response
* Populate DefaultReviewerApprovalsResponse with principal ids and current count
* Add MergeVerifyRulesResponse type
2025-02-26 17:56:59 +00:00
Karan Saraswat
97ea469c8a feat: [CODE-3253]: Remove lifecycle restriction check from /archive endpoint (#3481)
* feat: [CODE-3253]: Remove lifecycle restriction check from /archive endpoint
2025-02-25 16:57:46 +00:00
Darko Draskovic
df7ac77361 feat: [CODE-3233]: Automatically add default reviewers based on rules (#3464)
* Fix tests
* Amend on protection rules verify to include the entire rule output data
* Merge remote-tracking branch 'origin/main' into dd/rule-reviewers
* Fix protection.Branch init in mapToBranchRules
* Amend MergeVerify to include number of default reviewer approvals
* Merge remote-tracking branch 'origin/main' into dd/rule-reviewers
* Refactor add code owners as reviewers to include add default reviewers
* Automatically add default reviewers based on rules
2025-02-25 15:52:59 +00:00
Marko Gaćeša
9cd8e34cce techdebt: [CODE-3209]: move caches to store package (#3449)
* fix test
* Merge remote-tracking branch 'origin/main' into mg/cache/move-caches-to-store
* use pointers to types for evictor
* gob decoder requires ptr
* update pubsub namespace
* add generic evictor, clear cache on space update
* Merge remote-tracking branch 'origin/main' into mg/cache/move-caches-to-store
* added the missing MarkChanged call in spaces soft delete
* move caches to store package
2025-02-24 17:37:49 +00:00
Karan Saraswat
3a1348893d feat: [pipe-25436]: restrict user from updating harness-filestore repo (#3472)
* feat: [pipe-25436]: restrict user from updating harness-filestore repo
2025-02-24 06:47:36 +00:00
Karan Saraswat
02fe8c076f feat: [CODE-3150]: Validate repo identifier while importing repositories (#3445)
* feat: [CODE-3150]: Validate repo identifier while importing repositories
2025-02-22 11:23:39 +00:00
Marko Gaćeša
53142b18a8 techdebt: [CODE-3218]: use context.WithoutCancel in contextutil (#3457) 2025-02-20 19:20:48 +00:00
Darko Draskovic
e39ae83e78 feat: [CODE-2987]: Add codeowners as reviewers (#3439)
* Handle violations in branch CreatePullReqVerify
* Merge remote-tracking branch 'origin/main' into dd/codeowner-reviewers
* Add PullReq infix to Create rule interface and dedup reviewers in PR create
* Add create field to pullreq field in rule def
* Add codeowners as reviewers
2025-02-20 16:03:06 +00:00
Dhruv Dhruv
31d15dc8eb feat: [CDE-637]: Changes to support hybrid's infra resources. (#3453)
* Linting
* Refactoring db query in infra resource store for pq support.
* Using a default value of infra config identifier if not present in the create gitspace request.
* feat: [CDE-637]: Decoupling infra resource mgmt from config. Adding soft delete support to infra resource table.
* Making infra provider resource unique to config and space.
2025-02-19 06:45:24 +00:00
Saranya Jena
06c48f3d3d chore: [ML-660]: moved aiAgent, genAi and capabilities codebase from gitness to harness-intelligence (#3430)
* wire gen
* remove slack messaging code
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into ML-660
* chore: [ML-660]: removed execution analysis types

Signed-off-by: Saranya-jena <saranya.jena@harness.io>
* chore: [ML-660]: removed capabilities

Signed-off-by: Saranya-jena <saranya.jena@harness.io>
* chore: [ML-660]: updated branch

Signed-off-by: Saranya-jena <saranya.jena@harness.io>
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into ML-660
* chore: [ML-660]: removed aiAgent and capabilities codebase

Signed-off-by: Saranya-jena <saranya.jena@harness.io>
2025-02-18 10:17:05 +00:00
Dhruv Dhruv
ff4c51b56f feat: [CDE-636]: Support hybrid gcp vm usecases (#3434)
* Fixing infra config and resources create flow.
* Changing the metadata field's type in infra config create input.
* feat: [CDE-636]: Adding validation before infra config create and update. Adding ipconf_metadata column.
2025-02-14 14:09:47 +00:00
Karan Saraswat
f85b6c45c3 feat: [PIPE-24894]: Restrict lifecycle operations for reserved repo identifiers (#3426)
* feat: [PIPE-24894]: Restrict lifecycle operations for reserved repo identifiers
2025-02-13 12:01:53 +00:00
Darko Draskovic
13f6558ca3 techdebt: [CODE-3169]: Move unnecessary DB calls related to reviewer creation out of the create PR tx (#3420)
* Move activity creation out of tx and reset pr act seq after pr creation
* Add storeCreateReviewerActivity
* Move unnecessary DB calls related to reviewer creation out of the create PR tx
2025-02-13 11:14:36 +00:00
Karan Saraswat
8b81b19c3d feat: [PIPE-23710]: changed signature of RepoIdentifier to start taking session argument (#3345) (#3425)
* feat: [PIPE-23710]: changed signature of RepoIdentifier to start taking session argument (#3345)

* argument changed to session
* fixed failing go lint check
*

updated method usage
*

corrected spelling mistake
*

feat: [PIPE-23710]: changed signature of RepoIdentifier to start taking internal boolean argument
2025-02-13 10:14:20 +00:00
Karan Saraswat
5018aacfb7 feat: [PIPE-24894]: Revert "changed signature of RepoIdentifier to start taking session argument (#3345)" (#3424)
* Revert "feat: [PIPE-23710]: changed signature of RepoIdentifier to start taking session argument (#3345)"

This reverts commit a5f510c4b2.
2025-02-13 09:21:16 +00:00
Marko Gaćeša
a4a05b6281 chore: [CODE-3148]: remove repo git info cache (#3421)
* remove repo git info cache
2025-02-12 17:04:11 +00:00
Marko Gaćeša
a906259562 feat: [CODE-3148]: refactor refcache (#3390)
* linter issues fix
* reintroduce repofinder to aiagent
* Merge remote-tracking branch 'origin/main' into mg/cache/space-and-repo-finder
* removed refcache deps from aiagent
* pr comments
* fix linter issues
* refactor refcache
2025-02-12 12:42:12 +00:00
Prachi Shah
890fe494de fix: [ML-648]: remove explanation field from chat response body (#3416)
* Merge branch 'main' into ML-648
* remove explanation field
2025-02-12 11:29:10 +00:00
Vivek Dixit
5ef704e559 [feat]: [ML-657]: Added Support For PipelineGeneration (#3417)
* Addressed Comments
* FIxed lint errors
* [feat]: [ML-657]: Added Support For PipelineGeneration
2025-02-12 09:11:47 +00:00