143 Commits

Author SHA1 Message Date
Arvind Choudhary
653c7743b7 feat: [AH-1715]: Fixed all context issues (#4207)
* [AH-1715]: format fix

* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into AH-1715-fix-context

* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into AH-1715-fix-context

* [AH-1715]: More changes

* [AH-1715]: Fixed all context issues

* [AH-1715]: Fixed all context issues

* [AH-1715]: Fixed all context issues

* [AH-1715]: First pass of context fixing done
2025-08-06 06:21:26 +00:00
Enver Biševac
2880f22a65 fix: [CODE-2548]: skip custom headers, do not return early from func (#4211)
* 8dbf74 skip custom headers, do not return early from func
2025-08-05 09:36:45 +00:00
Enver Biševac
bd85212251 fix: [CODE-2548]: support for parsing jj headers (change-id) (#4199)
* e2c7a8 support for parsing jj headers (change-id)
2025-08-04 09:48:56 +00:00
Enver Biševac
72062ef659 feat: [code-3039]: add validation to OptimizeRepoStrategy type (#4109)
* add validation to OptimizeRepoStrategy type
2025-07-24 14:39:11 +00:00
Enver Biševac
5b86da53e8 feat: [CODE-3039]: git layer functions and methods (#4035)
* requested changes

* requested changes

* add header and nolint

* add gc args

* git layer functions and methods
2025-07-24 13:43:23 +00:00
Enver Biševac
7fc780c8d7 fix: [code-3039]: linter issue in PR 4035, remove unused const (#4048)
* remove unused const
2025-07-18 15:27:38 +00:00
Enver Biševac
9662ff92d3 fix: [CODE-4106]: fix git parser when committer/author email is empty (#4028)
* fix git parser when committer/author email is empty
2025-07-16 16:16:47 +00:00
Darko Draskovic
bdab4a14d2 feat: [CODE-3027]: Add secret scanning enable/disable to push rules (#3931)
* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Fix tests

* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Add PrintViolations to protection package

* Sort by size descending push objects in git svc

* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Add map[int64]PushProtection to push rules in/out

* Properly backfill rules

* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Add backfill violations

* Merge remote-tracking branch 'origin/main' into dd/secret-scan-rules

* Remove objects suffix from push protection related structs

* Optimize db settings fetch

* Add secret scanning enabled to push rules
2025-07-08 14:23:48 +00:00
Marko Gaćeša
7d0ffbfbc0 feat: [CODE-2554]: add commit and tag signature parse and verify (#3915)
* empty commit
* Merge remote-tracking branch 'origin/main' into mg/publickey/verify
* addressing PR comments
* addressing PR comments
* addressing PR comments
* commit signature parsing
2025-07-02 11:13:37 +00:00
Marko Gaćeša
490b1c4b6a fix: [CODE-3994]: fetching commit with ^{commit} (#3901)
* fetching commit with ^{commit}
2025-06-18 07:16:19 +00:00
Tudor Macari
811a0e11c3 feat: [AH-1062]: RPM registry upstream repo support, assync processing (#3885)
* feat: [AH-1062]: fix migrations
* fix
* resolve conflicts
* Merge branch 'AH-1062' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into AH-1062
* feat: [AH-1062]: RPM registry upstream repo support, assync processing
2025-06-17 04:47:05 +00:00
Marko Gaćeša
99491ffb2b fix: [CODE-3987]: fix not exist error for get branch git call (#3892)
* fix not exist error for get branch git call
2025-06-16 16:26:35 +00:00
Marko Gaćeša
63bc8d78c7 feat: [CODE-2548]: small commit/tag data related improvements (#3875)
* small commit data related improvements
2025-06-11 15:40:22 +00:00
Marko Gaćeša
01968a8f85 feat: [CODE-2548]: refactor git layer commit handling (#3870)
* refactor git layer commit handling
2025-06-11 10:15:00 +00:00
Marko Gaćeša
db66e6143e feat: [CODE-2548]: parse git object signature (#3862)
* parse git object signature
2025-06-10 13:40:12 +00:00
Enver Biševac
635830eb67 feat: [code-3119]: filtering in git clone (#3777)
* filtering in git clone
2025-05-13 17:27:47 +00:00
Marko Gaćeša
397628ed2e fix: [CODE-3831]: fix revert PR with no changes (#3782)
* fix revert PR with no changes
2025-05-13 15:34:22 +00:00
Karan Saraswat
0d67a5358f feat: [CODE-3530]: Return new file SHAs as part of commit API response (#3753)
* Apply suggestions from code review
* fixed formatting
* fixed fileRefs initialization
* Merge branch 'CODE-3530' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into CODE-3530
* addressed review comments
* Apply suggestion from code review
* addressed review comments
* Apply suggestions from code review
* feat: [CODE-3530]: Return new file SHAs as part of commit API response
2025-05-05 13:40:55 +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
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
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
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
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 53000fe59d42e53784dbb1e9703423c2c6f72de0.
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
Darko Draskovic
ec12dda66b fix: [CODE-3315]: Rename parameter max to maxCount (#3529)
* Rename parameter max to maxCount
2025-03-07 15:23:28 +00:00
Marko Gaćeša
164fa4153d feat: [CODE-3309]: move shared repo root dir to the same parent dir as the repos (#3517)
* removed the not-exist error check for MkdirAll
* move shared repo root dir to the same parent dir as the repos
2025-03-05 21:16:00 +00:00
Marko Gaćeša
b347c0f347 fix: [CODE-3307]: remove invalid file from repo if copy from sharedrepo fails (#3515)
* remove invalid file from repo if copy from sharedrepo fails
2025-03-05 21:00:43 +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
Marko Gaćeša
01956e255a fix: [CODE-3173]: remove zero reference updated check (#3408)
* remove zero reference updated check
2025-02-11 10:39:11 +00:00
Marko Gaćeša
530a707052 feat: [CODE-3076]: update several refs on merge (#3355)
* resolve pr comments
* update several refs on merge
2025-02-03 10:52:01 +00:00
Atefeh Mohseni Ejiyeh
a75e6ec4ec fix: [CODE-2501] Return 200 with an empty list for commits on non-existing references (#3366) 2025-02-01 02:28:29 +00:00
Enver Biševac
92e39dee79 feat: [CODE-3129]: add ignore whitespace for diff (#3327)
* better parsing of query param ignore_whitespace
* replace hideWhitespace with ignoreWhitespace
* replace rest client literals with vars
* added openapi
* add ignore whitespace for diff
2025-01-31 21:48:57 +00:00
Enver Biševac
d131a4f2aa feat: [CODE-3112]: write response using pkt error format in service pack and advertise refs (#3348)
* write to response pkt error format in service pack
2025-01-30 08:33:28 +00:00
Atefeh Mohseni Ejiyeh
9f9505dbb6 fix: [CODE-2501] fix handling non-cmd errors (#3305) 2025-01-21 22:15:29 +00:00
Marko Gaćeša
40dd6a19ed feat: [CODE-3061]: make git functions return not found if commit is not found (#3304)
* linter fix
* make git functions return not found if commit is not found
2025-01-21 16:15:41 +00:00
Enver Biševac
0a042b66e5 feat: [code-2984]: fix datarace on branch and tag counts, improved cmd package with mutex (#3202)
* requested changes
* fix datarace on beanch and tag counts, improved cmd package with mux
2024-12-25 13:22:48 +00:00
Atefeh Mohseni Ejiyeh
a6bb491688 fix: [CODE-2501] Handle Internal Server Error When Querying Non-existing Git References (#3136) 2024-12-13 02:27:30 +00:00
Enver Biševac
8c5a5b6716 feat: [code-2296] minor improvements on command package (#3046)
* Merge remote-tracking branch 'origin/main' into eb/code-2296
* requested changes
* added unit test and description
* refactor command parser
* minor improvements on command package
2024-12-07 17:10:47 +00:00
Darko Draskovic
f0d58cdda7 fix: [CODE-2833]: Ignore Redis related cache errors when get/set key (#3059)
* Ignore Redis related cache errors when get/set key
2024-11-28 18:19:12 +00:00
Marko Gaćeša
ad8f74ce71 feat: [CODE-2531]: replace os.IsNotExist(err) with error.Is(err, fs.ErrNotExist) (#3036)
* replace os.IsNotExist(err) with error.Is(err, fs.ErrNotExist)
2024-11-22 12:17:56 +00:00
Marko Gaćeša
f1eb44a30a feat: [CODE-2531]: ignore not found error in delete repo (#3023)
* remove err==NotFound check in controller layer
* ignore not found error in delete repo
2024-11-22 10:24:00 +00:00
Darko Draskovic
335eaa73c1 feat: [CODE-2498]: Add time and author filter params to list commits page (#3000)
* Remove redundant consts and annotate errors
* Add a Regex bool field to the api.CommitFilter
* Add use author/commiter regex bool to list commit filter
* Merge branch 'main' into dd/commit-time-author-filter
* Add commiter IDs
* Merge branch 'main' into dd/commit-time-author-filter
* Merge branch 'main' into dd/commit-time-author-filter
* Merge branch 'main' into dd/commit-time-author-filter
* Add regex quote for author
* Add time and author filter params to list commits page
2024-11-21 10:31:32 +00:00
Johannes Batzill
ccce5ad646 fix: [CODE-2717]: Modify Sync to take DefaultBranch as input (#2962) 2024-11-11 23:18:28 +00:00
Andreas Deininger
ff2da8563e [GH] Fix typos (#3566)
This PR fixes various typos i spotted in the project.
2024-11-07 11:34:07 -08:00
Marko Gaćeša
d79a1a290c feat: [PIPE-21976]: add flattened directory listing (#2869)
* remove unused parameter
* updated open api to include flatten_driectories param
* add flattened directory listing
2024-10-30 13:26:42 +00:00
Marko Gaćeša
7d58dcca04 feat: [CODE-2618]: remove old unused code from git/operations.go (#2863)
* remove old unused code from git/operations.go
2024-10-24 15:49:20 +00:00
Marko Gaćeša
8c5e7546c3 feat: [CODE-2567]: improve git commit message handling (#2849)
* make the change backward compatible
* improve git commit message handling
2024-10-24 10:08:36 +00:00
Johannes Batzill
5cbd33bd5d feat: [PIPE-22535]: Include previous commit in blame (#2812) 2024-10-17 18:21:51 +00:00
Marko Gaćeša
069a35a4d8 feat: [CODE-2484]: add API to squash commits on a branch (#2793)
* add openapi entry for squash
* minor fixes
* squash api
2024-10-15 16:49:02 +00:00