Commit Graph

1480 Commits

Author SHA1 Message Date
Johannes Batzill
1337f729e7 [Webhook] Add Swagger (#145)
This change adds webhook APIs to swagger and regenerates the web service clients based on the latest swagger.
2022-12-28 14:42:13 -08: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
Tan Nhu
23792ab2f5 Add Diff view Line Break configuration (#135)
* Add Diff view Line Break configuration

* Minor string change
2022-12-23 00:57:56 -08:00
Johannes Batzill
63c3740e58 [UI] Consume Latest OpenAPI Specs (#134)
* regenerate CODE service code to match latest API specs

* update readme
2022-12-22 21:58:38 -08:00
Tan Nhu
9da9aa42b5 Remove bad tick from icons package (#133) 2022-12-22 15:48:00 -08:00
Tan Nhu
97e70cd581 Implement commenting thread (#132)
* Implement commenting thread

* Add extra comment example
2022-12-22 15:06:56 -08:00
Tan Nhu
da3bfc9bd0 Implement PR commenting prototype (#131)
* Remove unused packages

* Remove some unused packages

* Height adjustment calculation for DiffViewer with CommentBox inside

* Add logic to render existing comments

* Improve rendering performance

* Remove optimization that makes things slow

* Use 'auto' to boost re-layout performance

* Fix wrong height calculation when 'auto' is being sent

* Fix CommentBox height adjustment when comments got changed
2022-12-22 13:34:54 -08:00
Marko Gaćeša
8f5e579001 rename DB table pullreq to pullreqs; added version (#130) 2022-12-22 20:21:15 +01:00
Enver Bisevac
22b0595476 initial work on raw diff (#129) 2022-12-22 14:30:31 +01:00
Tan Nhu
43c7e94e06 Add markdown editor into commenting (#128)
* Small refactoring

* Refactoring: Make it a bit easier for DOM manipulation

* Add markdown editor into commenting
2022-12-20 11:28:56 -08:00
Johannes Batzill
7abcacdd2f feat: Add Events Framework (#120)
This Commit adds:
- stream package (provides different implementation of stream producers and consumers)
  + Redis -> will be used for any non-local deployments
  + InMemory -> a VERY BASIC implementation that is used for local execution
- events package
  + GenericReporter -> responsible for reporting events, can be used to send any type of event and payload
  + GenericReader -> responsible for reading events from a stream, can be used to register handlers for any type of event and payload
  + ReaderFactory -> responsible for launching readers for any type of consumer group&name.
- webhook package
  + The wire frame of the webhook package.
- gitrpc/events package
  + defines event Reader/Reporter for events of category git
2022-12-16 13:37:08 -08:00
Tan Nhu
0d49ef1d69 Prototyping for diff annotations (#127) 2022-12-16 09:57:52 -08:00
Johannes Batzill
3b120dd2b3 Add Zerolog Support to GITRPC (#126)
This change adds the following:
- Inject APP server zerolog RequestID as metadata into all gitrpc calls from client side.
- Inject Zerolog logger into context with common fields set (like service, method, requestID, ...). This allows for better request tracking within gitrpc, but also request tracking across services we extract the requestID send by the grpc client
- Modify http logs to use http. prefix for common http related logging annotations.
2022-12-16 08:39:10 -08: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
Tan Nhu
619fd2c9de Add PR listing page + Commits tab for PR detail page (#123)
* Add PR listing page + Commits tab for PR detail page

* Add commits place-holder in Compare view

* Add commits place-holder in Compare view

* Correct PR number after creation

* Minor CSS improvement

* Add diff sample

* Diff side by side (3.4.2 is better than latest)

* Big PR diff example

* Implement diff view

* Scrolling optimization

* Add placeholder to allow click at line number
2022-12-12 16:39:14 -08:00
Marko Gaćeša
fe9118e074 PullReq list API: Added pagination headers (#121) 2022-12-09 17:02:45 +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
efcb047f46 pullreq refactor: fix linter issues (#115) 2022-12-07 14:22:44 +01:00
Marko Gaćeša
9e86875217 Returning author and merger info for PRs (#114) 2022-12-07 14:03:17 +01:00
Marko Gaćeša
8bdb31a4e2 checking branch existence in PR create (#105)
* checking branch existence in PR create
* added new methods to gitrpc: existence check for branch and tag
2022-12-06 12:26:12 +01:00
Tan Nhu
d898f4edb7 Add placeholders for PR page (#113)
* Add placeholders for PR page

* Add placeholders for PR page
2022-12-05 10:44:47 -08:00
Tan Nhu
225199b008 feat: Add Create Git Pull Request flow (#111) 2022-12-02 21:32:42 -08:00
Sahithi Kolichala
7c4fe6292f feat: [SCM-42]: added tabs to settings page (#108)
* feat: [SCM-42]: added setting tabs

* feat: [SCM-42]: added settingtabs

* feat: [SCM-42]: added tabs to the settings page

* feat: [SCM-42]: fixed review comments
2022-12-02 21:08:03 -08:00
Shubham Banthia
c6e178c71c adding server hook implementation for post and pre receive (#109)
* adding server hook implementation for post and pre receive

* addressing comments

* update logging

* updating import order

* adding file header for license
2022-12-02 13:25:53 -08:00
Marko Gaćeša
a50e9a9951 fix list pullreq API openapi spec (#110) 2022-12-02 14:29:10 +01:00
Sahithi Kolichala
4c8323584b feat: [SCM-42]: fixed the reposetings content (#107) 2022-12-01 13:59:04 -08:00
Sahithi Kolichala
caea272046 feat: [SCM-42]: added listing page (#106) 2022-12-01 13:55:04 -08:00
Tan Nhu
edb6baabc6 Refactor to use shorter names + initial code for PR (#104) 2022-12-01 11:21:25 -08:00
Enver Bisevac
c64874143d allow line endings from input 2022-11-30 23:30:41 +01:00
Enver Bisevac
7a54ef9d65 fix with file content on commit, fix linter, removed unused provider 2022-11-30 22:36:01 +01:00
Sahithi Kolichala
08f8c14055 feat: [SCM-42]: added createwebhook form (#103)
* feat: [SCM-42]: added createwebhook form

* fix: [SCM-42]: mdified the string

* fix: [SCM-42]: use strings for strings
2022-11-30 11:02:42 -08:00
Marko Gaćeša
1f4ac7e4b4 pullreq: list API (#99) 2022-11-30 13:56:29 +01:00
Tan Nhu
6e5147578b Minor padding improvements (#102) 2022-11-29 20:01:13 -08:00
Shubham Banthia
c7df722c8a adding server side hook for update (#94)
* adding server side hook for update

* addressing comments

* update comments for command
2022-11-29 19:51:08 -08:00
Sahithi Kolichala
e410681739 fix: [SCM-42]: fixed the webhook page header (#101) 2022-11-29 14:09:50 -08:00
Marko Gaćeša
49cd521593 comment fix (#98) 2022-11-29 17:00:28 +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
Tan Nhu
a567a6ce76 Fix highlighting not enable at root level (#97) 2022-11-29 03:11:27 -08:00
Tan Nhu
a90fc1c59e Fix 500 exception when editing a file (#96) 2022-11-29 02:48:37 -08:00
Tan Nhu
505d72049b Finalize API integration for commits (#95) 2022-11-29 02:21:23 -08:00
Enver Bisevac
2b1bf42e3d merged changes 2022-11-29 11:09:06 +01:00
Enver Bisevac
9257abcd91 Merge branch 'main' of github.com:harness/gitness 2022-11-29 11:07:25 +01:00