Vistaar Juneja
8cdcecb56f
add pipelines and executions handlers to gitness
2023-08-04 10:50:39 +01:00
Marko Gacesa
5fd846fd25
Merge branch 'mg/spaces/list-pagination' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #257 )
2023-08-01 10:40:30 +00:00
Enver Bisevac
4dcc5efc76
Merge branch 'eb/update-status-fix' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #260 )
2023-08-01 09:48:22 +00:00
Marko Gacesa
e61ad42550
Merge branch 'mg/memberships/openapi_fix' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #256 )
2023-08-01 09:47:59 +00:00
Enver Bisevac
077171c8d7
replace double Close status with one close and merge in query
2023-08-01 11:34:43 +02:00
Marko Gaćeša
0e0a1abb18
fix pr update
2023-07-31 17:01:49 +02:00
Marko Gaćeša
6946df193b
add pagination to the status check list API
2023-07-31 13:23:34 +02:00
Marko Gaćeša
416bd1ba36
openapi update for the sapce membership list API
2023-07-31 12:36:31 +02:00
Hitesh Aringa
592a9aeb63
[PR Check] Fix PR Status Check Bug ( #253 )
2023-07-28 23:15:01 +00:00
Enver Bisevac
16801fc59d
Merge branch 'eb/code-683' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #249 )
2023-07-28 13:54:27 +00:00
Marko Gaćeša
f5084697b1
Minor fixes and refactoring
2023-07-28 12:57:16 +02:00
Enver Bisevac
a0f8caac10
PRs mergeable status should change if target branch is updated
2023-07-28 12:49:04 +02:00
Johannes Batzill
338271fb14
feat: [CODE-674]: user's space membership; membership API pagination ( #241 )
2023-07-26 20:53:42 +00:00
Akhilesh Pandey
71ffa224f0
[CODE-621]: Add check to prevent last and only admin deletion ( #205 )
2023-07-25 04:03:43 +00:00
Johannes Batzill
c7e3620de9
[Tags] Improvements towards creation / listing /deletion ( #220 )
2023-07-25 00:04:47 +00:00
Marko Gaćeša
9c8e578d90
typo fixes
2023-07-24 15:10:56 +02:00
Johannes Batzill
baa4eb5ac9
feat: [CODE-626,CODE-627]: space membership API&DB ( #194 )
2023-07-20 21:20:56 +00:00
Johannes Batzill
e354f560a5
Replace QueryParamAsPositiveInt64 with QueryParamAsPositiveInt64OrDefault where the parameter is optional ( #191 )
2023-07-13 05:46:16 +00:00
Akhilesh Pandey
699156d56d
CODE-548: API support to remove reviewers from pull request
2023-06-22 22:31:52 +05:30
Johannes Batzill
36e8bdb368
[GITHA] Introduce Generic store
Package ( #143 )
2023-06-20 00:26:40 +00:00
Johannes Batzill
06067d4f6c
Fix Linting errors ( #142 )
2023-06-15 21:27:06 +00:00
Johannes Batzill
e1a24699c3
CODE-385: Search and Add reviewers to Database API ( #126 )
2023-06-15 20:26:36 +00:00
Enver Bisevac
a9b06bd273
Merge branch 'eb/code-246' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #113 )
2023-06-12 14:29:30 +00:00
Marko Gaćeša
f6c689a3cf
fix error handling in find many principal info
2023-06-08 15:43:31 +02:00
Marko Gaćeša
cdc1370564
feat: [CODE-389]: status checks API layer
2023-06-08 12:38:20 +02:00
Enver Bisevac
85361d27fb
docker UBI images for pipelines
2023-06-06 15:39:38 +02:00
Marko Gaćeša
d750b8a459
feat: [CODE-365]: add status check data layer
2023-05-30 19:52:20 +02:00
Enver Bisevac
d865f08eb0
Merge branch 'eb/code-174-fix' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #69 )
2023-05-12 17:12:03 +00:00
Enver Bisevac
3889cb891f
use enum from types
2023-05-12 19:01:29 +02:00
Enver Bisevac
4c4035d1e3
Merge branch 'eb/code-174' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness ( #63 )
2023-05-12 15:57:52 +00:00
Enver Bisevac
74c3c856a8
squash merge option added
2023-05-12 14:33:02 +02:00
Marko Gaćeša
3274fca051
fix internal error in get PR activity list API
2023-05-12 13:26:39 +02:00
Marko Gaćeša
59b7cf5e69
comment status API
2023-05-08 16:03:23 +02:00
Marko Gaćeša
de0ab2bc75
return old/new-line-new values used to create cc
2023-05-04 11:08:24 +02:00
Marko Gaćeša
be3b68e577
make merge base SHA not nullable
2023-04-27 13:12:54 +02:00
Johannes Batzill
89bb0f6b99
update gitRPC getBlob api to stream blob content, add 'raw' api.
2023-04-18 11:39:59 -07:00
Marko Gaćeša
13e4ffe522
Add code comments
2023-04-13 14:12:01 +02:00
Johannes Batzill
84ac386b10
[FIX] Make pullreq_merge_check_status
NOT NULL for postgres ( #345 )
2023-02-14 21:24:50 -08:00
Johannes Batzill
9d894c79cc
[MERGE] Enhance PR Merge (Check) Fields. ( #342 )
2023-02-14 20:18:10 -08:00
Johannes Batzill
ee035dfb3b
[MISC] Make Search Query Case-Insensitive for Repo/Space/PR/Webhook ( #330 )
2023-02-13 15:31:59 -08:00
Enver Bisevac
82b8679d6f
[fix] diff-stats api returns total commits and files changed in compare branches ( #323 )
2023-02-13 00:47:23 +01:00
Enver Bisevac
13a456e357
[scm-58] Add merge-check
and Integrate with PR ( #318 )
...
Co-authored-by: Johannes Batzill <johannes.batzill@harness.io>
2023-02-11 23:22:12 -08:00
Johannes Batzill
4e46af81de
[MISC] Fix UNIQUE Violation for Postgres ( #315 )
2023-02-07 21:43:36 -08:00
Marko Gaćeša
efcd415603
CLI migrate command ( #304 )
2023-02-07 12:50:46 +01:00
Johannes Batzill
bf9906c4ce
[API] Add principals
API, move users
to admin
, simplify user/service/serviceaccount validation ( #300 )
2023-02-03 00:15:11 -08:00
Marko Gaćeša
9dfad8b5e1
Added column comment_count to the PR entity ( #280 )
2023-02-02 11:31:22 +01:00
Marko Gaćeša
eb07ce4c2e
Using PR events to maintain repo PR counters ( #270 )
2023-01-31 19:52:16 +01:00
Marko Gaćeša
ce322ec596
Writing pull req activities in controllers ( #263 )
2023-01-31 12:34:18 +01:00
Hitesh Aringa
474ee82531
[SCM-87]: Db file name changes ( #264 )
2023-01-30 14:53:37 -08:00
Marko Gaćeša
4277c4c66b
Simplify handling of PR events ( #253 )
2023-01-27 16:27:03 -08:00
Marko Gaćeša
825336d0e4
Added missing context in some of the log calls ( #250 )
2023-01-25 14:06:48 +01:00
Marko Gaćeša
fe3d6d5990
Added num_merged_pulls ( #240 )
2023-01-25 11:21:19 +01:00
Johannes Batzill
085e63422b
[MISC] Explicitly type PullReqActivity.Payload ( #233 )
2023-01-20 12:29:13 -08:00
Enver Bisevac
6a7cc4e518
[scm-63] fix for empty commits and diff in PR ( #228 )
2023-01-20 02:27:51 +01:00
Johannes Batzill
335998505e
[MISC] Introduce PathStore and Move PathLogic to Controller Layer ( #226 )
...
This change is a follow up on the effort to remove transactions and sync stores from the database layer, and move them in the application layer. It is addressing the repo + space store.
The following changes are included:
- Introduce PathStore storing resource paths (repo + space)
- Add foreign key from path.repo_id/space_id to repo.id/space.id
- Add foreign key from repo/space.parent_id to space.id
- Remove repo_sync and space_sync
- Move path creation logic to repo/space controller (for both creating primary paths for new repos/spaces, as well as creating alias spaces)
- Reimplement repo/space moving on controller layer
2023-01-18 11:34:12 -08:00
Marko Gaćeša
ec4003e331
Handling branch events for PRs ( #221 )
2023-01-18 13:26:20 +01:00
Hitesh Aringa
66cc979334
[SCM-61]: sort in webhook list api ( #199 )
...
* [SCM-61]: order by in webhook api
* [SCM-61]: comment change
* [SCM-61]: added query filter on display name
2023-01-17 09:59:27 -08:00
Marko Gaćeša
8151b4591e
PR change state API; Removed rejected state ( #220 )
2023-01-17 16:04:30 +01:00
Marko Gaćeša
6705c7234d
feat: [SCM-60]: return number of duplicate PR, unique partial index for PR branch uniqueness ( #214 )
2023-01-17 11:42:33 +01:00
Marko Gaćeša
ce55d3349c
added merge commit sha fields to PR ( #205 )
2023-01-13 14:49:24 +01:00
Marko Gaćeša
bacda596fa
Added Correct method for enum types ( #194 )
2023-01-13 13:59:53 +01:00
Marko Gaćeša
091ff2d618
Removed joins from the PR-related list quieries ( #204 )
2023-01-13 13:58:49 +01:00
Marko Gaćeša
8909037ec7
enum types should have Enum() method ( #192 )
2023-01-12 17:13:03 +01:00
Johannes Batzill
a74d779dc4
[Webhook] Add display_name/description/latest_execution_result to webhook ( #180 )
...
This PR adds the following fields to webhooks:
- 'DisplayName' - the display name of the webhook for easier recognition in UI (no uniqueness guarantees)
- 'Description' - an (optional) description of the webhook
- 'LatestExecutionResult' - contains the result of the latest execution of the webhook
2023-01-11 17:11:10 -08:00
Marko Gaćeša
24e03c03e0
Added principal info cache ( #173 )
...
* added principal info cache
* updated code based on the PR comments
* updated implementation of deduplicate()
* minor changes
* [K, T] -> [K, V]
2023-01-11 20:32:37 +01:00
Enver Bisevac
63de576d08
[feat] initial work on merging PR ( #170 )
...
* initial work on merging PR
* code refactored based on requested changes
* requested changes
2023-01-10 02:09:43 +01:00
Marko Gaćeša
65b49a933a
pull request reviewers ( #167 )
2023-01-06 20:29:20 +01:00
Johannes Batzill
06721dcf20
[Techdebt] merge user/service/serviceaccount stores into single principal store ( #160 )
...
This change merges the `UserStore`, `ServiceStore`, and `ServiceAccountStore` into a single `PrincipalStore`.
2023-01-05 15:58:18 -08:00
Johannes Batzill
d61e876de0
[FIX] Add repo_pullreq_seq to pullreq read APIs ( #158 )
2023-01-05 01:06:55 -08:00
Johannes Batzill
1f1118f624
[Webhook] Add Event Processing and Retrigger ( #148 )
...
This change includes:
- webhook event processor (includes actual webhook execution)
- webhook retrigger API allowing to retrigger previous webhook executions
2023-01-04 14:43:36 -08:00
Johannes Batzill
f5ef764318
[DB] fix index namings, improve composite index performance ( #154 )
...
This changes includes:
- change index naming to be consistent
- reorder columns in composite indices for paths/principals to improve performance
2023-01-04 12:47:41 -08:00
Marko Gaćeša
ff934c840f
Geting users by email, fix for Postgres ( #150 )
2023-01-04 19:16:09 +01:00
Marko Gaćeša
98ac3d130d
techdebt: [SCM-43]: Using opt lock to generate PR number ( #151 )
2023-01-04 12:24:17 +01: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
ae6e864f57
Removed sync store for token/service/user/service-acc ( #139 )
2022-12-29 11:52:50 +01:00
Johannes Batzill
44ec7ceb07
[Webhook] Add API and DB Basics ( #142 )
...
This change introduces:
- webhook type / store / controller / handler
- webhookExecution type / store / controller / handler
- foreign key fix for sqlite3
2022-12-28 13:07:48 -08:00
Marko Gaćeša
f14731455d
Add parent_id column to the pullreq_activities DB table ( #143 )
2022-12-28 18:51:34 +01:00
Marko Gaćeša
c81ddeb65f
Fixed pullreqs DB table name in migration ( #140 )
2022-12-27 17:51:03 +01:00
Marko Gaćeša
da53331ca1
PR comment: edit and delete APIs ( #138 )
2022-12-27 14:55:53 +01:00
Marko Gaćeša
b5bdeb8538
create comment API ( #137 )
2022-12-27 11:46:49 +01: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
8f5e579001
rename DB table pullreq to pullreqs; added version ( #130 )
2022-12-22 20:21:15 +01:00
Marko Gaćeša
a734db6f0c
global mutex for the dbtx package ( #118 )
2022-12-13 17:52:16 +01:00
Marko Gaćeša
204548169d
pullreq: update API ( #122 )
2022-12-13 16:13:27 +01:00
Marko Gaćeša
6bde210adf
added branch params to PR list API ( #119 )
2022-12-09 15:45:02 +01:00
Marko Gaćeša
a0646e9935
using a lib for sql null types ( #117 )
2022-12-08 16:30:49 +01:00
Marko Gaćeša
15163f3daa
pullreq: dedicated struct for pulling data from DB ( #116 )
2022-12-08 12:52:31 +01:00
Marko Gaćeša
9e86875217
Returning author and merger info for PRs ( #114 )
2022-12-07 14:03:17 +01:00
Enver Bisevac
7a54ef9d65
fix with file content on commit, fix linter, removed unused provider
2022-11-30 22:36:01 +01:00
Marko Gaćeša
1f4ac7e4b4
pullreq: list API ( #99 )
2022-11-30 13:56:29 +01:00
Marko Gaćeša
1eba93695b
feat: pull requests ( #89 )
...
* feat: pull requests, data layer
* pull requests: api layer
* add pull request number
* added auth check
2022-11-29 13:51:59 +01:00
Enver Bisevac
630c9b553f
ordering imports linter and writer ( #85 )
2022-11-22 23:42:39 +01:00
Enver Bisevac
93fc430776
[bug] git clone/pull/push auth using Basic Authorization fixed ( #66 )
...
* git clone/pull/push auth using Basic Authorization fixed
* use api key as git login
* middleware renamed to RequiredInGitPath
* remove requiredingitpath middleware
* requested changes
* requested changes
* minor code cleanup
2022-11-11 07:59:32 +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
3ba0f75c8d
Introduce UIDs for Space / Repo / Tokens, Add Custom Harness Validation, ... ( #57 )
...
This change adds the following:
- Space UID + Custom harness validation (accountId for top level space, harness identifier for child spaces)
- Repo UID + Custom harness validation (harness identifier)
- Store Unique casing of space / repo path and add Path.ValueUnique (with Unique index) to allow for application layer controlling the case sensitivity (case insensitive standalone vs partially case sensitive harness)
- Token UID (unique index over ownertype + ownerID + tokenUID)
- Add DisplayName for principals (replaces Name to avoid confustion)
- Store Unique casing of principal UID and add Principal.ValueUnique (with unique index) to allow for application layer, per principal type control of case sensitivity (required in embedded mode)
- Generate serviceAccount UID (+Email) Randomly (sa-{space|repo}-{ID}-{random}) - Allows to have a unique UID across all principals while reducing likelyhood of overlaps with users + avoid overlap across spaces / repos.
- Sync casing of space names (accountId orgId projectId) when creating spaces on the fly (to ensure case sensitivity of - harness code) or use the existing space to update casing.
- Update serviceaccount client to match updated NG Manager API
- in embedded mode create spaces for harness resources owning the service account
2022-11-06 23:14:47 -08: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
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
Enver Bisevac
1cf07b6417
initial work on create repository ( #27 )
...
* initial work on create repository
* create repository as single method call using client stream
* resources handler and files
* minor fix for wire dep graph
2022-10-11 17:48:04 +02:00