Commit Graph

116 Commits

Author SHA1 Message Date
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
Yogesh Chauhan
d2a2c2c361 fix: [ML-648]: Add error to generate output structs (#3397)
* fix test
* pointer to message
* Add error to generate output structs
2025-02-10 11:42:43 +00:00
Prachi Shah
babaff18f0 feat: [ML-629]: UT added for sanitize conversation function (#3376)
* UT added for sanitize conversation function
2025-02-05 07:32:30 +00:00
Darko Draskovic
3b31d78da6 feat: [CODE-3134]: Add fetch label with include_values query param (#3369)
* Compose/repack LabelWithValues in find label controller
* Merge remote-tracking branch 'origin/main' into dd/fetch-label-with-values
* Revert to non pointer ListQueryFilter
* Replace Label with LabelWithValues in find repo/space label
* Address review comments
* Add pagination to list values and return all values when fetching a single value
* Add new svc label find with values func
* Add fetch space label with include_values query param
* Add fetch label with include_values query param
2025-02-04 19:53:27 +00:00
Prachi Shah
44f3628f53 feat: [ML-629]: change generate pipeline stage input struct (#3363)
* error message change
* gci
* sanitize func modified
* Merge branch 'main' into cs
* run goimports
* done
* change generate pipeline stage input struct
2025-02-04 11:42:51 +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
Darko Draskovic
2f9d9583e6 feat: [CODE-1805]: Add service account rule bypass list support (#3297)
* Make service account store code more consistent
* Merge remote-tracking branch 'origin/main' into dd/service-account-bypass
* Merge remote-tracking branch 'origin/main' into dd/service-account-bypass
* Merge remote-tracking branch 'origin/main' into dd/service-account-bypass
* Remove principal controller interface
* Address review comments
* Merge remote-tracking branch 'origin/main' into dd/service-account-bypass
* Merge remote-tracking branch 'origin/main' into dd/service-account-bypass
* Add pagination to repo/space list service account
* Revert to non embedded Principal to ServiceAccount
* Merge remote-tracking branch 'origin/main' into dd/service-account-bypass
* Add query param to service account list
* Add inherited param to principal filter
* Merge remote-tracking branch 'origin/main' into akp/CODE-1805
* Merge remote-tracking branch 'origin/main' into akp/CODE-1805
* Return service account info instead of vanilla service account
* Return principal info to return id instead o
2025-01-31 17:46:24 +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
Marko Gaćeša
f016ac9ac9 feat: [CODE-3030]: introduce include_git_stats param for list PRs APIs (#3284)
* introduce include_git_stats param for list PRs APIs
2025-01-17 11:27:23 +00:00
Darko Draskovic
6554c472d1 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/pr-creation-label-assign
* Add label creation to pullreq creation
2025-01-16 16:48:56 +00:00
Ansuman Satapathy
083a24d8eb feat: [CDE-582]: refactor gitspaces, use spaceCache (#3227)
* feat: [CDE-582]: refactor gitspaces seperate DB layer.
* feat: [CDE-582]: refactor gitspaces seperate DB layer.
* feat: [CDE-582]: refactor gitspaces seperate DB layer.
* feat: [CDE-582]: refactor gitspaces seperate DB layer.
2025-01-07 05:06:39 +00:00
Enver Biševac
c94a181e7e fix: [code-2912]: minor improvements, requested changes (#3197)
* minor improvements, requested changes
2024-12-23 16:20:40 +00:00
Enver Biševac
db38802e83 feat: [code-2912]: usage service implementation (#3168)
* feat: [code-2912]: rest and ui changes (#3178)

* requested changes
* rest and ui changes
* requested changes
* add midleware to raw and archieve endpoints
* wire fixed
* requested changes
* Merge remote-tracking branch 'origin/main' into eb/code-2912
* added initial values from db
* minor improvements
* requested changes
* remove check for bandwidth
* wiring dep
* improved test
* limits check added
* config added, minor improvements
* usage service implementation
2024-12-20 10:28:47 +00:00
Abhinav Singh
c7f7ade6b6 feat: [CODE-2886]: jira auth support (#3119) 2024-12-12 19:36:08 +00:00
Yogesh Chauhan
f82dd44d57 fix: [ML-505]: Fix generate step API input type (#3120)
* fix: [ML-505]: Fix generate step API input type
2024-12-06 10:18:29 +00:00
Darko Draskovic
18da27f968 feat: [CODE-2857]: Add checks API to spaces (#3084)
* Fix stmt reassignment
* Add get descendent ids helper to space store
* Add checks API to spaces
2024-12-03 15:31:56 +00:00
Ansuman Satapathy
c65f994af9 feat: [CDE-522]: send total gitspaces without applying user filters in header (#3089)
* feat: [CDE-522]: formatting
* feat: [CDE-522]: formatting
* feat: [CDE-522]: send total gitspaces without applying user filters in header
* feat: [CDE-522]: send total gitspaces without applying filter in header
2024-12-02 07:03:22 +00:00
Yogesh Chauhan
a89041e57e feat: [ML-334]: Extract interface for Intelligence service (#3066)
* Fix copyright header
* Fix lint issues wrt copyright & comment structure
* feat: [ML-334]: Extract interfae for Intelligence service
2024-11-28 10:48:23 +00:00
Vivek Dixit
3f54161997 [feat]: [ML-488]: Added New API for StepYamlGeneration for UI to call separately. (#3030)
* fixed go-lint issues
* [feat]: [ML-488]: Added New API for StepYamlGeneration for UI to call separately.
2024-11-22 07:55:26 +00:00
Darko Draskovic
fd9a1ad400 feat: [CODE-2568]: Add rules API for space level (#2865)
* Add openapi spec for space rules
* Merge branch 'main' into dd/space-branch-rules
* Fix doc comments and space permissions
* Merge branch 'main' into dd/space-branch-rules
* Add equal check to update rule
* Merge branch 'main' into dd/space-branch-rules
* Use consistently RuleParentInfo
* Add RuleParentInfo type
* Merge branch 'main' into dd/space-branch-rules
* Rename r to rule in funcs and rule to protection
* Merge remote-tracking branch 'origin/main' into dd/space-branch-rules
* Unifiy instrumentation and audit handling
* Add delete, find, list and patch svc funcs and API endpoints
* Add rules API for space level
2024-11-19 12:52:27 +00:00
Ansuman Satapathy
d9d00e9e06 feat: [CDE-481]: for the plugin, only show self gitspaces (#2997)
* feat: [CDE-481]: for the plugin, only show self gitspaces
* feat: [CDE-481]: for the plugin, only show self gitspaces
2024-11-14 03:52:22 +00:00
Karan Saraswat
123969c7e1 feat: [PIPE-23137]: updated executionInfo struct with more data and added lastExecutions to list space pipelines API (#2958)
* fixed go lint
* fixed go lint
* feat: [CODE-23137]: added execution summary data to list space pipelines API
2024-11-08 19:08:20 +00:00
Karan Saraswat
0cd3e0693f feat: [PIPE-22871]: API for listing executions for a project/space (#2941)
* fixed go lint
* added header
* Apply suggestions from code review
* feat: [PIPE-22871]: added filters for list space executions API
* feat: [PIPE-22871]: count of pipelines db query will be run if there is more than 1 page
* removed pipelineId ans repoId from executionPipelineRepoJoin
* fixed go lint
* addressed review comments
* Apply suggestions from code review
* Apply suggestions from code review
* fixed lint
* feat: [PIPE-22871]: API for listing executions for a project/space
2024-11-08 11:55:40 +00:00
Karan Saraswat
0e5b3d64bd feat: [PIPE-22870]: added missing pipelines listing API for spaces (#2924)
* feat: [PIPE-22870]: added missing pipelines listing API for spaces
2024-11-05 12:26:25 +00:00
Marko Gaćeša
0db33abeb1 feat: [PIPE-22454]: add PR metadata in get/list PR API response (#2912)
* add PR metadata in PR API response
2024-11-05 12:02:44 +00:00
Deepak Bhatt
516fadfe8f fix: [CDE-290]: modify list function for gitspaces (#2908)
* feat: [CDE-332]: debugging
* feat: [CDE-332]: debugging
* feat: [CDE-332]: debugging
* feat: [CDE-332]: debugging
* feat: [CDE-332]: fix subquery no alias
* feat: [CDE-332]: fix subquery no alias
* feat: [CDE-332]: fix subquery no alias
* feat: [CDE-332]: fix subquery no alias
* feat: [CDE-332]: remove duplication of code
* feat: [CDE-332]: remove duplication of code
* feat: [CDE-332]: remove duplication of code
* 

feat: [CDE-332]: remove duplication of code
* 





modify list all
* 





fix lint
* 





add sorting
* 





modify list function
2024-11-01 06:07:53 +00: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
Ritik Kapoor
6a17336aaa fix: [CODE-2566] add FF config and hide plugin step behind a UI Flag - GITNESS_UI_SHOW_PLUGIN (#2847)
* fix: [code-2566] address comment
* fix: [code-2566] address comment
* fix: [code-2566] address comments
* fix: [CODE-2566] lint check
* fix: [CODE-2566] add FF config and hide plugin step behind local FF - GITNESS_FF_SHOW_PLUGIN_STEP
2024-10-24 18:40:52 +00:00
Marko Gaćeša
5eb79b3805 feat: [PIPE-22290]: add additional info to list branches API (#2831)
* change type of branch.SHA from string to sha.SHA
* remove code duplication, changed DB query for PRs
* add additional info to list branches API
2024-10-24 13:19:35 +00:00
Darko Draskovic
0f3956696c feat: [PIPE-22071]: Enhance pipeline list API to include last 10 execution summaries for a pipeline (#2840)
* Scan directly into types.ExecutionInfo
* Merge remote-tracking branch 'origin/main' into dd/pipeline-execs
* Merge remote-tracking branch 'origin/main' into dd/pipeline-execs
* Add last_executions param and optimize db query for last execs
* Enhance pipeline list API to include last 10 execution summaries for a pipeline
2024-10-23 16:17:25 +00:00
Karan Saraswat
9a12d72a10 feat: [PIPE-22618]: API to fetch PR with the source and target branch (#2838)
* fixed go lint error
* fixed swagger endpoint
* feat: [PIPE-22618]: API to fetch PRs with the source and target branch
2024-10-22 11:45:10 +00:00
Atefeh Mohseni Ejiyeh
5efca19288 feat: [CODE-2375]: Support import v2 for labels (#2695) 2024-10-21 20:23:36 +00:00
Darko Draskovic
b002a60b02 feat: [CODE-2292]: Add API for space level webhook creation (#2730)
* Merge remote-tracking branch 'origin/main' into dd/webhooks-space
* Move webphookpreprocessor to webhook controller
* Merge remote-tracking branch 'origin/main' into dd/webhooks-space
* Merge branch 'main' into dd/webhooks-space
* Add webhookpreprocessor service
* Add WebhookParentInfo type and refactor webhook svc and store to use it
* Introduce webhookpreprocessor service
* Add space webhooks
* Refactor handlers to use custom fn params
* Move everything webhook service related to webhook service
* Remove webhook parent info type
* Add webhook execution count
* Add space webhooks
2024-10-18 16:27:56 +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
Patrick Wolf
d789e5775e feat: [CODE-2402] : Update all occurences of 'gitness' to 'harness' within comments and markdown. Updated the logo reference (did not delete the Gitness logo directory yet). No active code changes except display strings. (#2684)
* Apply suggestion from code review
* updating images for signin and register page.
* fix: lint
* fix: logo update
* revert golangci
* Adding more strings and updated the logo. Still need to update the signin page images
* Apply suggestion from code review

Updating harness logo to use Open Source logo
* Update all occurences of 'gitness' to 'harness' within comments and markdown. Updated the logo reference (did not delete the Gitness logo directory yet).  No active code changes except display strings.
2024-09-25 00:13:28 +00:00
Karan Saraswat
8bc9714c92 feat: [CODE-2370]: changes for using PR source branch delete/restore API (#2702)
* fixed error for branch not found
* swagger.yaml prettier
* removed commitSha queryParam and do a getBranch to get the commitSha
* fixed lint issue
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into CODE-2370-2
* added commit_sha query param to PR delete branch API
* fixed linting issues
* updated swagger
* feat: [CODE-2370]: changes for using PR source branch delete/restore API
2024-09-20 08:13:50 +00:00
Vistaar Juneja
d91b3f8ed8 feat: [CI-14316]: Connectors support in gitness (#2699)
* fix postgres migration
* address comments
* fix lint
* fix lint issues
* fix db schema, remove unnecessary files
* normalize schema to enforce secret integrity
* connectors fixes
* add created_by field
* rebase connectors implementation with latest
* fix lint
* change UID -> identifier
* refactor files around and lint
* Basic implementation for connectors
2024-09-18 13:24:48 +00:00
Karan Saraswat
93b642b2ba feat: [CODE-2359]: PR source branch delete/restore API (#2690)
* passed 409 for open PRs for restore branch API
* addressed review comments
* fixed lint issue
* feat: [CODE-2359]: PR source branch delete/restore API
2024-09-18 12:17:21 +00:00
Marko Gaćeša
16cb3d5bc1 add rebase api (#2675)
* add rebase api
2024-09-10 16:58:44 +00:00
Yogesh Chauhan
0af264d09f feat: [ML-338]: APIs for Harness Intelligence (#2667)
* Return empty summary/branch for now
* Fix Lint Issues
* feat: [ML-288]: API skeletons for Harness Intelligence
* fix ai pipelines (#2659)

* fix ai pipelines
* Update pipeline name (#2658)

* Update pipeline name
* fix: [ML-288]: update remediation prompt and suggestions (#2652)

* fix: [ML-288]: update remediation prompt and suggestions
* fix: [ML-288]: update url for artifact registry (#2651)

* fix: [ML-288]: update url for artifact registry
* Add snippet to mark code as written by Harness Intelligence (#2628)

* Add snippet to mark code as written by Harness Intelligence
* Add snippet to mark code as written by Harness Intelligence (#2626)

* Add snippet to mark code as written by Harness Intelligence
* feat: [ML-288]: link to harness artifact registry (#2619)

* some linting fixes
* feat: [ML-288]: link to harness artifact registry
* feat: [ML-286]: updating pipeline suggestions (#2620)

* updating suggestions
* feat: [ML-286]: updating pipeline suggestions
* feat: [ML-288]: adding slackbot (#2603)

* updating slack responses
* prevent responding to any bot messages
* feat: [ML-288]: adding slackbot
* throw error for commit
* commit stubbed
* feat: [ML-286]: moving stubbed response earlier in execution (#2602)

* feat: [ML-286]: moving stubbed response earlier in execution
* feat: [ML-286]: adding stubbed response for analyze execution (#2600)

* updating branch name
* adding updated-main for analyse-execution endpoint
* feat: [ML-286]: adding stubbed response for analyze execution
* Update AnalyseExecutionOutput to contain multi file diff (#2592)

* Create branch and commit changes on analyse
* Simplify AnalyseExecutionOutput to contain only high level summary and branch
* Update AnalyseExecutionOutput to contain multi file diff
* updating endpoints for unscripted demo (#2594)

* cleaning up code, adding suggested pipeline response
* updating suggestions api
* updating endpoints for unscripted demo
* Stub out generate pipeline yaml
2024-09-09 17:49:44 +00:00
Karan Saraswat
644678f50c feat: [CODE-2339]: Send sha in delete branch API and fix dry run rules behaviour (#2672)
* go lint issues and added return in the Deletebranch method
* removed the comment
* fixed go lint issues
* fixed query param in swagger
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into ks/CODE-2339
* feat: [CODE-2339]: Send sha in delete branch API and fix dry run rules behaviour
2024-09-09 11:45:18 +00:00
Enver Biševac
61c794da0b feat: unrealted histories error handling (#2642)
* comments added
* return proper status and message for unrelated history
* code cleanup
* requested changes
* feat: unrealted histories error handling
2024-09-06 11:41:21 +00:00
Marko Gaćeša
75042e9293 add pullreq list API for spaces (#2606)
* moved the service to the existing pullreq package
* add pullreq list API for spaces
2024-08-29 11:49:33 +00:00
Karan Saraswat
55d2b1dee3 feat: [CODE-2297]: add dry run param for delete branch API (#2590)
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into CODE-2297
* updated comment
* worked on review comments and added to openapi spec
* return empty violations array when dry_run = true
* feat: [CODE-2297]: add dry run param for delete branch API
2024-08-28 08:39:04 +00:00
Akhilesh Pandey
0578be8afe feat: [CODE-1941]: user group changes (#2134)
* feat: [CODE-1941]: remove usergroup filter from request
* feat: [CODE-1941]: decrement page for harness-core
* feat: [CODE-1941]: update pagination request
* feat: [CODE-1941]: change interface from find to list
* feat: [CODE-1941]: change reviewer add permissions
* feat: [CODE-1941]: comments
* feat: [CODE-1941]: comments
* fix wire issues
* feat: [CODE-1941]: remove users from the db table usergroups
* feat: [CODE-1941]: annotate errors
* feat: [CODE-1941]: annotate errors
* feat: [CODE-1941]: sql style
* feat: [CODE-1941]: revert common.go change for parse limit
* feat: [CODE-1941]: move usergroup listing to space level
* feat: [CODE-1941]: update usergroup listing and update delete to push permission
* feat: [CODE-1941]: Update combined listing
* feat: [CODE-1941]: Update combined listing
* feat: [CODE-1941]: format
* feat: [CODE-1941]: rebase
* feat: [CODE-1941]: separate db struct for usergroup.go
* feat: [CODE-1941]: change usergroup filter to default query and review comments
* feat: [CODE-1941]: change usergroup filter to default
* feat: [CODE-1941]: change return type for search service interface
* feat: [CODE-1941]: change return type for search service interface
* feat: [CODE-1941]: change return type for search service interface
* feat: [CODE-1941]: Search Service interface and wire changes
* feat: [CODE-1941]: Search Service interface and wire changes
* feat: [CODE-1941]: Search UserGroups Handler change - codeformat
* feat: [CODE-1941]: Search UserGroups Handler change - codeformat
* feat: [CODE-1941]: Search UserGroups Handler change - codeformat
* feat: [CODE-1941]: Search UserGroups Handler change
* feat: [CODE-1941]: Big change: New LOGIC for UserGroup Reviewers
* feat: [CODE-1941]: DB changes
* feat: [CODE-1941]: listing api
* feat: [CODE-1941]: mapping methods
* feat: [CODE-1941]: list method for pullreq_reviewers db
* feat: [CODE-1941]: database queries
* feat: [CODE-1941]: database queries
* feat: [CODE-2058]: dbstore changes
* feat: [CODE-1941]: Controller and Database code
* feat: [CODE-1941]: update reviewer_add.go code
* feat: [CODE-1941]: update reviewers and usergroup db migrations
* feat: [CODE-1941]: Update API ops
* feat: [CODE-1941]: Update DB ops for reviewers
* feat: [CODE-1941]: db migration update
* feat: [CODE-1941]: db migration update
* feat: [CODE-1941]: code comments
* feat: [CODE-1941]: update migration numbering
* feat: [CODE-1941]: Add postgresql migrations
* feat: [CODE-1941]: Update DB ops for reviewers

feat: [CODE-1941]: Update API ops

feat: [CODE-1941]: update reviewers and usergroup db migrations

feat: [CODE-1941]: update reviewer_add.go code

feat: [CODE-1941]: break pr

feat: [CODE-1941]: break pr

feat: [CODE-1941]: Update migration numbering
* feat: [CODE-1941]: create table usergroups
* feat: [CODE-1941]: table migrations
* feat: [CODE-1941]: user group changes
2024-08-26 15:35:27 +00:00
Tudor Macari
40ee05ca11 feat: [AH-309]: Artifact Registry integration (#2318) 2024-08-22 00:28:17 +00:00
Yogesh Chauhan
59614e73f4 feat: [ML-302]: Framework For Harness Intelligence APIs (#2547)
* feat: [ML-302]: Framework For Harness Intelligence APIs
2024-08-20 22:05:29 +00:00
Atefeh Mohseni Ejiyeh
cef6708a1e Support Repo Migration APIs (create repo, import PRs, webhooks, and branch rules) (#2158)
* update migrator mdoule
* added formatted forbidden error helper
* delete work sum
* check branch rule identifier check
* match migrator data contract for webhooks
* self review
* self review
* self review, code cleaning
* resolve conflicts
* updated import api calls
* resolve conflicts
* lint
* bypass pre-receive block ref update on push if it's migrator push
* migrate controller and apis
* pull main
* add migrate routes to terminate path prefix apis
* move apis to migrate pkg
* Merge branch 'main' of https://git0.harness.io/l7B_kbSEQD2wjrM7PShm5w/PROD/Harness_Commons/gitness into atmsn/import_meta
* import branch rules API
* wip import webhooks
2024-08-07 23:40:09 +00:00
Ansuman Satapathy
9fc9a498e2 feat: [CDE-192]: modularize gitspace services (#2404)
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: resource identifier empty
* feat: [CDE-192]: address comments
* feat: [CDE-192]: split config and resource creation
* feat: [CDE-192]: split config and res creation
* feat: [CDE-192]: modularize gitspace services
2024-08-07 08:27:29 +00:00
Darko Draskovic
0cb3c8a4cf Add render pagination and incremental search to labels (#2311)
* Remove unused upsert method from label value store
* Add render pagination and incremental search to labels
2024-07-30 15:43:31 +00:00