Commit Graph

1016 Commits

Author SHA1 Message Date
Calvin Lee
443394b964 feat: [scm-81]: restyle webhook page (#266) 2023-01-30 16:53:41 -07:00
Calvin Lee
d445cf6f72 feat: [scm-81]: restyle webhook list page (#261) 2023-01-27 16:02:33 -07:00
Calvin Lee
7e98f4828b feat: [scm-73]: fix empty repo page (#258) 2023-01-27 15:57:17 -07:00
Calvin Lee
001d706998 feat: [scm-73]: Update repo empty state with new design (#254) 2023-01-26 17:21:43 -07:00
Johannes Batzill
2227e13e7d [MISC] Fix Swagger and Regenerate WEB Services (#246) 2023-01-24 15:46:49 -08:00
Tan Nhu
b700603fef Sort PR activities + add animation when creating a new comment (#243)
Co-authored-by: Tan Nhu <tnhu@users.noreply.github.com>
2023-01-23 23:48:37 -08:00
Tan Nhu
16487667aa Render PR diff snapshot in the first thread comment (#239)
Co-authored-by: Tan Nhu <tnhu@users.noreply.github.com>
2023-01-22 12:32:31 -08:00
Tan Nhu
48c6802a9f Finalize PR Code Comment integration (#237) 2023-01-20 15:29:11 -08:00
Tan Nhu
56a6dba484 Implement PR code commenting using payload field (#235) 2023-01-19 16:29:38 -08:00
Tan Nhu
230fed6a52 Consolidate page spinner across UI codebase (#229) 2023-01-18 16:31:06 -08:00
Tan Nhu
e4b529d32d Consolidate NoResultCard + styling for tabs (#227) 2023-01-18 05:45:06 -08:00
Tan Nhu
09e3c89657 Add empty state for Compare and PR views (#225) 2023-01-17 17:12:53 -08:00
Tan Nhu
eed7b2c29b Consolidate logic to show No Result (#223)
* Add no result search view into repo listing view

* Consolidate logic to show No Result
2023-01-17 16:11:39 -08:00
Tan Nhu
1aa1123bd2 Consolidate pagination for the whole codebase + Use SearchInputWithSpinner component (#222)
* Remove center layout for empty repo info - hard to read

* Consolidate pagination for the whole codebase

* Use SearchInputWithSpinner component

* Use SearchInputWithSpinner component
2023-01-17 14:59:56 -08:00
Tan Nhu
a611a2c038 Remove center layout for empty repo info - hard to read (#219) 2023-01-16 12:34:59 -08:00
Tan Nhu
fd5bbc6904 Fix small git url typo (#218) 2023-01-16 12:26:41 -08:00
Tan Nhu
92c82f5c44 Disable branch creation when committing first new file into an empty repo (#217) 2023-01-16 12:20:09 -08:00
Tan Nhu
797e339e02 Implement flow to create a new file when repo is empty (#216)
* Implement flow to create a new file when repo is empty

* Implement flow to create a new file when repo is empty

* Fix edit file does not show content
2023-01-16 11:51:00 -08:00
Tan Nhu
bbae67299c Finish API integration for PR review box (#212) 2023-01-13 13:41:07 -08:00
Tan Nhu
c31c315459 Add ability to edit PR title (#211) 2023-01-13 12:17:24 -08:00
Tan Nhu
3b5542a61d Add Pagination for Diff view (#208) 2023-01-13 09:23:10 -08:00
Johannes Batzill
c827fa5e66 [MISC] Webhook Creation Default To Secure, Fix PR/Compare Commit Listing, Fix Merge Commit Message (#203)
This change is fixing a few things on both UI and backend side:
- update webhook creation screen to default to enable ssl verification (secure by default should always be the move)
- fix pr/compare commit listing to show correct diffs the head branch is ahead of the base branch (NOTE: THIS ONLY SHOWS THE LATEST 20 COMMITS - NO PAGINATION ADDED)
- fix merge commit message to contain the correct head branch, source repo path and pr numbers (similar'ish to github)
2023-01-13 02:49:39 -08:00
Johannes Batzill
d9a01ef9a3 [MISC] Update UI webhook creation to enable secure by default (#202) 2023-01-13 01:40:15 -08:00
Johannes Batzill
eabdf2ab86 [MISC] Show merged after PR got merged (#201) 2023-01-13 00:35:41 -08:00
Johannes Batzill
65c59d0b5b [MISC] Fix review bugs, regenerate swagger from latest service, fix webhook.has_secret in swagger (#198)
This change contains the following changes:
- allow submitting reviews without comment for approve
- fix openapi for /reviews api and fix UI calls for submitting reviews
- fix recently broken openapi for webhook (it removed has_secret field as part of openapi refactor)
- fix fatal submit review bug (we passed repo.UID not repo.GitUID to gitrpc - not sure how that ever worked?)
- add missing merge pr activity to list of all pr activity enum values
- return all PR states by default
- show Open PRs by default (instead of all) and fix state filtering query
- regenerate code services based on latest swagger
- fix UI code to work with regenerated code service
2023-01-12 22:39:38 -08:00
Tan Nhu
b7e0f6cce5 Minor change to disable Review changes button (#197)
* Minor change to disable Review changes button

* Update PR listing icons
2023-01-12 21:04:08 -08:00
Johannes Batzill
517166965b [UI] Add Tag Events, Enable All Events, Fix Empty Secret (#196)
* webhook edit from only show SECRET_MASK if webhook has a secret

* Add tag events, support 'all events', hide 'push events'
2023-01-12 18:24:37 -08:00
Tan Nhu
73bc9a55f7 Implement PR review changes flow (#195) 2023-01-12 12:45:31 -08:00
Tan Nhu
38fb97b8e2 Add placeholder for Review changes (#193) 2023-01-12 09:56:01 -08:00
Tan Nhu
1c5a588a83 Hide Review button when PR is merged + Fix PR.id issue (#191)
* Replace all references of PR.id by PR.number

* Hide Review button when PR is merged
2023-01-12 04:20:27 -08:00
Tan Nhu
b2bf061679 Replace all references of PR.id by PR.number (#190) 2023-01-12 02:18:16 -08:00
Tan Nhu
eb8d125f8b Minor text change (#189) 2023-01-12 02:05:50 -08:00
Tan Nhu
86bf9cb0c4 Render PR activity system type (#188) 2023-01-12 01:46:29 -08:00
Tan Nhu
6719e11c09 Add styling for two PR states (#187)
* Refresh activities after merging

* Fix activities API call using wrong PR number

* Update logic to submit webhook secret

* Update webhook with new fields (display_name, desc)

* Add styling for two PR states
2023-01-12 01:14:26 -08:00
Johannes Batzill
5b55f48772 [Tags] Adding EVENT and WEBHOOK Support For Tags (#185)
Adding tagcreated, tagupdated, and tagdeleted events.
Adding tag_created, tag_updated, and tag_deleted webhooks
2023-01-11 20:56:00 -08:00
Johannes Batzill
d4d74f0f44 [SWAGGER] update swagger with latest webhook changes and re-render web services (#184) 2023-01-11 17:41:01 -08:00
Tan Nhu
79318bd522 Fix activities API call using wrong PR number (#179)
* Refresh activities after merging

* Fix activities API call using wrong PR number
2023-01-11 12:02:22 -08:00
Tan Nhu
f7962785aa Add minor webhook edit flow improvements (#178) 2023-01-11 09:10:59 -08:00
Tan Nhu
abd132fdf6 Implement Webhook CRUD (#177) 2023-01-11 08:44:50 -08:00
Johannes Batzill
777eaadba7 regenerate web services to update to latest set of webhook triggers (#166) 2023-01-06 02:53:16 -08:00
Tan Nhu
1c769238f1 Small optimization when editing PR description (#165) 2023-01-06 02:12:01 -08:00
Tan Nhu
4938718aca Add Changes integration into PR Compare view (#164) 2023-01-06 01:56:37 -08:00
Tan Nhu
4c6c2b3b56 Fix service generation bug + fix reply to comment thread rendering (#162) 2023-01-05 23:08:39 -08:00
Tan Nhu
b2c4de4751 Full API integration for PR Conversation tab (#161) 2023-01-05 21:26:50 -08:00
Tan Nhu
8ac12ee341 API integration for Conversation comments (#153) 2023-01-02 16:14:51 -08:00
Tan Nhu
58a2d90973 Redirect to Compare when editing a file with new branch created (#149) 2022-12-29 22:41: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
Tan Nhu
e4ae2b269b Implement components to support PR commenting (#146) 2022-12-28 15:58:02 -08:00
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
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
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
Tan Nhu
0d49ef1d69 Prototyping for diff annotations (#127) 2022-12-16 09:57:52 -08: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
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
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
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
Tan Nhu
6e5147578b Minor padding improvements (#102) 2022-11-29 20:01:13 -08:00
Sahithi Kolichala
e410681739 fix: [SCM-42]: fixed the webhook page header (#101) 2022-11-29 14:09:50 -08: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
Sahithi Kolichala
b8cc24c491 feat: [SCM-42]: added route for createwebhook (#93)
* feat: added route for createwebhook

* feat: added createwebhook route
2022-11-28 14:48:30 -08:00
Tan Nhu
17c93350ae feat: [SCM-36]: Refactor SCM to CODE (#92) 2022-11-23 16:39:41 -08:00
Sahithi Kolichala
bb6850f13f added settings empty flow (#90) 2022-11-23 13:38:03 -08:00
Tan Nhu
68de8e236b Fix branches pagination (#88) 2022-11-23 02:53:51 -08:00
Tan Nhu
cc6fbbf58d Resolve cicular dependency (#87) 2022-11-22 14:12:16 -08:00
Tan Nhu
362137440f Use new BranchTagSelect in creating a new branch modal (#84)
* Use new BranchTagSelect in creating a new branch modal

* Use new BranchTagSelect in creating a new branch modal
2022-11-22 03:16:24 -08:00
Tan Nhu
49736b308c Add BranchTagSelect component (#83)
* Fix message encoding

* Add prototype for BranchTagSelect component

* Finish BranchAndTag component
2022-11-22 02:35:18 -08:00
Tan Nhu
e5fe4b67fe Fix message encoding (#81) 2022-11-17 03:03:50 -08:00
Tan Nhu
21eb0f61b6 Fix branch sorting (#80)
* Implement Branch item actions

* Implement Branch item actions

* Fix sorting
2022-11-17 02:02:26 -08:00
Tan Nhu
6d8c979e7c Implement Branch item actions (#79)
* Implement Branch item actions

* Implement Branch item actions
2022-11-17 01:48:48 -08:00
Tan Nhu
7116c2fbe4 Implement Create Branch (#78)
* Update new icons

* Implement Create Branch
2022-11-17 00:16:57 -08:00
Johannes Batzill
60f0ea969d [API] Add API For Commit Divergence Calulation (#77)
This commit contains the following changes:
- Add `commits/calculate_divergence` API to calculate commit divergence of reference pairs
- Rename `serviceAccounts` to `service_accounts` to follow REST best practices
2022-11-16 16:53:31 -08:00
Tan Nhu
f204a5a2f8 Fix double ? in API URL (#75) 2022-11-15 13:21:31 -08:00
Tan Nhu
782c6f2bd7 Refactor type system + add flow to copy/edit/delete a file (#73)
* Fix double query

* Add file toolbar buttons + wire up copy, delete, etc...

* Refactor type system
2022-11-15 02:42:59 -08:00
Enver Bisevac
07a630c40b repoStore findref fixed 2022-11-14 13:08:28 +01:00
Tan Nhu
5ab69952e2 Disable caching and sniffing via HTTP headers for UI main entry resources (#72) 2022-11-13 20:18:07 -08:00
Johannes Batzill
681e1f1c14 [SWAGGER] Add create/delete branch swagger, fix existing swagger (#71)
This change includes the following:
- add swagger for create / delete branch api
- remove `json` tag from fields of swagger objects that only occur in the path
2022-11-10 21:21:38 -08:00
Tan Nhu
81040d0453 Fix double query (#69) 2022-11-10 17:46:07 -08:00
Tan Nhu
31a58e3172 Add routingId to support Harness gateway + Prototype for Commit modal (#68)
* Implement file path edit input

* Implement file path edit input - cont

* Prototype for Commit modal

* Add routingId to support Harness gateway
2022-11-10 15:17:55 -08:00
Tan Nhu
b93c0ce103 Update git clone URL (#65) 2022-11-08 19:45:38 -08:00
Tan Nhu
a418e5e94f Add some debugging info for PR deployment (#62)
* Add some debugging info for PR deployment

* Add some debugging info for PR deployment
2022-11-08 17:07:49 -08:00
Tan Nhu
93dbc6005f Correct API URL path + minor code editor change (#61)
* autoFocus editor

* Correct API URL path
2022-11-08 16:37:13 -08:00
Tan Nhu
073154eebb Update clone URL + minor code refactoring (#60)
* FileEditor improvements

* Update clone URL + minor code refactoring
2022-11-08 14:34:43 -08:00
Johannes Batzill
8fe80ab811 Remove Identifier from UI - Replace with original Name (#59)
* remove identifier from UI and replace it with original 'Name'
* extend uid to length 100
* allow repo name of length 1
2022-11-07 14:37:50 -08:00
Tan Nhu
c7f852cbf4 Flow for edit file (#58) 2022-11-07 11:35:48 -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
Tan Nhu
2fe8669119 Add clone tooltip (#56) 2022-11-06 12:39:14 -08:00
Tan Nhu
0d5771d706 Implement Branches page (#55) 2022-11-04 00:22:21 -07:00
Tan Nhu
23e597758a Refactor: abstract parameters into hooks + add placeholders for branches and settings (#54) 2022-11-03 15:48:55 -07:00
Tan Nhu
0bdae50be2 API integration for Commits page (#52) 2022-11-01 20:38:42 -07:00
Tan Nhu
3f7fc109d0 Branch search and styles (#50)
* Add LatestCommit component

* Add branches search

* Proper link for root
2022-11-01 00:53:46 -07:00
Tan Nhu
c21b860e46 Refactor: Use types from SCM Service (#48) 2022-10-27 00:57:20 -07:00
Tan Nhu
c8b978a6ed API integrations + simplify design (#46) 2022-10-25 03:25:46 -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
Tan Nhu
6cadb048ba Initial skeleton for Repository Resource View flow (#30)
* API integration for Repos listing page

* Add custom branch when creating a repo

* Skeleton for Repository Resource View flow
2022-10-11 23:54:10 -07:00
Tan Nhu
788ee30ba3 Add prototyping for Repos page (#24) 2022-10-03 12:06:27 -07:00
Tan Nhu
2ccfb74a51 Rename SCM to Gitness 2022-08-29 14:28:46 -07:00
Tan Nhu
bad786e769 Add typing improvements 2022-08-26 15:57:05 -07:00
Tan Nhu
f2b65c7f77 Clean up unused files (cont) 2022-08-22 17:04:21 -07:00
Tan Nhu
88dff819c9 Clean up unused files 2022-08-22 16:44:07 -07:00
Tan Nhu
7f5a783416 Merge pull request #3 from harness/ui-template-improved
Simplify routing system
2022-08-22 16:04:37 -07:00
Tan Nhu
6d3d3d62f6 Simplify routing system 2022-08-22 16:04:00 -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
7c6da77a27 Sync UI template with latest updates 2022-08-18 11:44:33 -07:00
Tan Nhu
66fea2a730 Sync UI template with latest updates 2022-08-12 12:09:57 -07:00
Tan Nhu
5891818ce1 Initial commit 2022-08-09 12:37:37 -07:00