Commit Graph

38 Commits (dc351cdcef945259fb168aa8b9393ff97d862a85)

Author SHA1 Message Date
Johannes Batzill dc351cdcef [LINT] Fix All Linting Errors (#609) 2023-09-26 00:56:53 +00:00
Johannes Batzill a83cd21c17 [OPEN-SOURCE] Prepare Repository (#605) 2023-09-24 07:33:16 +00:00
Johannes Batzill 6d132a8591 [AUTH] Add Cookie Support to Standalone (#409) 2023-09-07 00:58:23 +00:00
Vistaar Juneja d1d50377fc address comments 2023-08-11 11:36:39 +01:00
Vistaar Juneja 2bf73fbb5c add UpdateOptLock 2023-08-09 23:56:47 +01:00
Vistaar Juneja 26d6651168 address comments, complete secret CRUD 2023-08-09 15:02:48 +01:00
Marko Gaćeša 053580ddd4 fix PR list state param parse 2023-08-01 13:24:03 +02:00
Johannes Batzill 45026edf2b Merge branch 'akp/deprecate-formvalue' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#188) 2023-07-19 00:01:25 +00:00
Johannes Batzill e354f560a5 Replace QueryParamAsPositiveInt64 with QueryParamAsPositiveInt64OrDefault where the parameter is optional (#191) 2023-07-13 05:46:16 +00:00
Johannes Batzill 5543fba0b4 [GIHA] Introduce `githa` custom githook binary (#186) 2023-07-12 15:49:06 +00:00
Akhilesh Pandey 959fb7b462 CODE-610: Remove FormValue and start using Query().Get() for all APIs doing get requests and sync required parameters in swagger schema 2023-07-12 21:16:07 +05:30
Johannes Batzill f78777f1d4 [MISC] Fix `InternalError` for invalid resource ids in path (#278) 2023-01-31 19:08:30 -08:00
Johannes Batzill 3ee51e29a4 [MISC] move custom filter/sort parsing methods to their respective files 2023-01-12 23:08:45 -08:00
Johannes Batzill 7ada1af3aa [API] Add `after` Support to Commit Listing (#155) 2023-01-04 16:59:43 -08:00
Marko Gaćeša a79e187a88 DB & API refactor: Use snake case (#144)
Update DB and API to follow Harness Standard
2022-12-29 13:53:08 -08:00
Marko Gaćeša 7fc77396a9 Pull request timeline feature: DB and the list API (#136) 2022-12-26 12:17:38 +01:00
Marko Gaćeša 1f4ac7e4b4 pullreq: list API (#99) 2022-11-30 13:56:29 +01:00
Enver Bisevac 630c9b553f ordering imports linter and writer (#85) 2022-11-22 23:42:39 +01:00
Johannes Batzill c55c53deab [API] Add Create + Delete Branch API (+ Basic GIT Error Propagation) (#70)
This change adds the following:
- create / delete branch
- basic error propagation from git to user (notfound, conflict, invalidinput)
- create repo root folder in server instead of service constructor
2022-11-10 20:57:31 -08:00
Johannes Batzill 2d4db78991 Add Tag Listing API (#49)
This change is adding the List Tags API. To do so, a few changes were necessary:
- Refactor List Branches on giteaAdapter / repo_service
- Expose WalkReferences via giteaAdapter
2022-10-28 13:10:26 -07:00
Johannes Batzill c0258b34ef Add search capability to repo and space listing (for child spaces) (#44)
This change is adding search capability to the following apis:
- child repositories
- child spaces
*NOTE* The search space is limited to direct child repos/spaces.
2022-10-24 18:57:55 -07:00
Johannes Batzill 5337c46a4f Add Query and Sorting Capability to ListBranches API (#42)
This change adds the following to the list branches api:
- 'query' parameter for querying branches using arbitrary substrings
- 'sort' parameter for sorting the branches (name and date supported)
- 'direction' parameter for specifing the direction of the sorted output
2022-10-21 20:45:26 -07:00
Johannes Batzill f655c2fae3 Add Standalone API to Harness Router (#40)
To simplify UI code we are going to expose both Harness API and Standalone API (restricted to harness embedded functionalities) when running in harness mode.

Furthermore, this PR adds a middleware that allows us to reuse standalone Handlers for Harness API for operations that don't require any request/response manipulation.
2022-10-19 18:35:40 -07:00
Johannes Batzill 743aee6029 [API] Add List Branches, Improve latestCommit Performance for listing directory (#38)
This commit has the following changes:
- API for listing branches
- Improve performance of content API for dir type responses with includeCommit=true
- swagger for git operations
- fix file names from camelCase to kebab_case
2022-10-17 23:05:50 -07:00
Johannes Batzill 91a75ed601 Add GetContent and ListCommits APIs, Fix DefaultBranch support (#32)
Adds the following:
- Add GetContent API (with gitrpc, proto, gitadapter changes)
- Add ListCommits API (with gitrpc, proto, gitadapter changes)
- DefaultBranch (to repo table in DB, update branch in git-repo, have default value in config)
2022-10-17 00:14:31 -07:00
Enver Bisevac 00647d7d1b [MAINT] golangci-lint config changed (#31)
* goheader linter added

* file header consistency
2022-10-13 14:39:15 +02:00
Johannes Batzill 5786ad2409 [Embedded] Harness Router, Inline Space Creation, Bootstrap, Harness/Admin User Setup (#28)
Adds the basic for harness embedded mode:
- Harness dedicated router with custom APIHandler
- Inline Space Creation
- Client for Account/Org/Project
- Bootstrap (Allows for automated creation of admin user and gitness service (used for all platform required ops))
- Inline harness service principal creation
- Ignore flag for ACL.
2022-10-10 21:32:14 -07:00
Johannes Batzill fad6e18898 Introduce Controller for Repo, Space, User, and ServiceAccount (#25)
Preparing the support for harness specific API router + http handler, which allows us to have complete control over the rest api naming and functionality, without having to do complex path rewrites or request / reponse rewrites inline.
2022-10-03 18:56:49 -07:00
Johannes Batzill 4668e94027 [Harness] Adding JWT/PAT/SAT Support, Harness Clients, Inline User/ServiceAccount Creation, harness Build flag, ... (#22)
This change adds the initial stepping stones for harness integration:
- Authentication: JWT/PAT/SAT support
- Authorization: ACL integration (acl currently denies requests as gitness hasn't been integrated yet)
- Remote Clients for Token, User, ServiceAccount, ACL
- User Integration: Syncs harness users during authentication if unknown
- SA integration: syncs harness service accounts during authentication if unknown
- Initial harness API: THIS WILL BE CHANGED IN THE FUTURE!
- single harness subpackage (all marked with harness build flag)
- harness & standalone wire + make build commands
2022-09-30 16:22:12 -07:00
Johannes Batzill 8c2f900c80 Principals, ServiceAccounts, Tokens and auth.Sessions (#15)
This change introduces the concept of a principal (abstraction of call identity), and adds a new service account type principal. Also adds support for different tokens (session, PAT, SAT, OAuth2) and adds auth.Session which is being used to capture information about the caller and call method.
2022-09-25 23:44:51 -07:00
Enver Bisevac f03528e862 [MAINT] initial config for ci linter (#17)
* initial config for ci linter

* more linter work

* linter errors fix

* linter errors fix

* linter conf minor changes
2022-09-19 18:13:18 +02:00
Johannes Batzill 1115a5083b Add `Paths` support and error improvements (#11)
This change is adding the concept of Paths.
A repository and space always have a Primary Path which always is represents the ancestry to the root space.
All access history / resource visibility / child listings / UI traversal / etc. is done via that path.

Additionally, repos and spaces can have Alias Paths, which as the name states are aliases. via the primary path.
They sole impact is that a space or repo can be reached via different paths from the UI / rest apis / git apis.
This fulfills two major purposes:
- Customers can rename or move projects and spaces without breaking any existing references from CI pipeliens / code bases / local repos / ...
- Customer can create shorter aliases for important repos when in harness embeded mode! (acc/org/proj/repo can be shortened to acc/repo, or acc/repo'

Apart from the path changes, this PR adds:

Improved User facing errors
Improved internal error handling and wrapping
update / rename operation for repo and space
path list / delete / create operation for repo and space
2022-09-08 21:39:15 -07:00
Johannes Batzill ff806fb492 block 'api' as root space name, minor improvements 2022-09-05 18:45:16 -07:00
Johannes Batzill d7f0ae4b2c Add base structure for rest api, git api, web api. Add base authn and authz, as well as spaces and repository apis 2022-09-05 13:47:00 -07:00
Johannes Batzill 32e6c4929f Add authn, authz, spaces, guard, terminated FQNs 2022-09-05 13:47:00 -07:00
Johannes Batzill 4aa8819765 Rename project to 'gitness' 2022-08-29 10:12:07 -07:00
Johannes Batzill 813d343f6a Rename module to github.com/harness/scm. Fix web/dist.go 2022-08-18 15:15:50 -07:00
Tan Nhu 5891818ce1 Initial commit 2022-08-09 12:37:37 -07:00