Commit graph

82 commits

Author SHA1 Message Date
bkellam
bbc9e815c8 experiment with writing logs to DB 2025-10-10 14:01:32 -07:00
bkellam
963f6fd69e add indexing 2025-10-10 12:32:34 -07:00
bkellam
32ce1ca16d wip 2025-10-09 20:10:29 -07:00
bkellam
8d7babc8d2 chore(worker): Change log message to debug 2025-10-07 16:38:56 -07:00
Michael Sukkarieh
aa62847143
fix(ado): Manually pass token through http header for ado server (#543)
* support passing in token manually in auth header

* remove unneeded PAT embed check

* cleanup authheader usage

* changelog

* var name typo

* unset auth header in fetch

* move unset to finally in fetch
2025-09-27 17:14:29 -07:00
Brendan Kellam
ef46c0181d
chore: fix support email (#529) 2025-09-21 12:19:12 -07:00
Brendan Kellam
5073c7db22
[experimental] feat(ee): GitHub permission syncing (#508) 2025-09-20 16:51:14 -07:00
Michael Sukkarieh
af39b20668
fix(azure): Set username in azuredevops clone url (#524)
* set placeholder username for azuredevops clone url

* changelog
2025-09-19 09:48:58 -07:00
Tarang Chikhalia
7020761ca6
fix(backend): Sourcebot not pulling github forked repos (#499) 2025-09-18 15:06:46 -07:00
Michael Sukkarieh
e7fa4c4765
feat(connections): Add Azure Devops Support (#514)
* initial ado pol

* add support for ado logo

* default to main instead of HEAD when generating file url

* bump zoekt

* fix(web) Fix "At least one project, user, or group must be specified" for GitLab configs in web configurator (#512)

* feat(ask_sb): Fallback on fromNodeProviderChain if access key or sessionToken are not provided (#513)

* Quote branches argument in zoekt.ts to fix Pipe (#506)

* remove connections settings page

* fix styling and remove additional components

* add changelog

* add docs

* fix build error

* bump zoekt

* fix broken links for ado docs

* fix HEAD support for ado

* changelog

---------

Co-authored-by: Brendan Kellam <bshizzle1234@gmail.com>
Co-authored-by: Michael Dekoski <michaeldekoski@gmail.com>
2025-09-17 22:18:56 -07:00
Michael Dekoski
4a449da7d8
Quote branches argument in zoekt.ts to fix Pipe (#506) 2025-09-17 14:02:09 -07:00
Fede Sanchez
7cbda320cb
fix(bitbucket): Bitbucket Cloud pagination not working beyond first page (#502) 2025-09-15 19:43:50 -07:00
msukkari
aab4a92a87 fix for zoekt logs as errors 2025-09-09 18:44:23 -07:00
Brendan Kellam
7d0c6588e1
feat(gitlab): Add exclude.userOwnedProjects config setting (#498) 2025-09-08 22:38:18 -04:00
Brendan Kellam
b05fc7a0c8
fix(backend): Explicitly set refspec on fetch (#497) 2025-09-08 16:15:58 -04:00
Brendan Kellam
d694330998
fix(worker): Fix "attempting to index 0 total files" zoekt issue (#488) 2025-09-04 11:14:29 -04:00
bkellam
2241217b0b fix(worker): First check keys before unsetting them 2025-09-01 10:21:08 -04:00
Brendan Kellam
2b423ba7e9
fix(worker): Remove setting remote.origin.url for remote git repositories (#483) 2025-08-31 13:52:51 -04:00
Brendan Kellam
d9fa221d72
chore(web): Upgrade to NextJS 15 (#477) 2025-08-22 14:48:29 -04:00
Brendan Kellam
a3d9711178
feat(gerrit): Multi-branch indexing support for Gerrit (#433) 2025-08-05 16:35:47 -07:00
Brendan Kellam
01dee161b3
fix(github): Fix issue with users not getting picked up in GitHub config (#428)
* fix

* changelog
2025-08-04 17:39:28 -07:00
Michael Sukkarieh
e47fdb51db
fix(repoManager): Don't fetch files for each repo on validation (#414) 2025-07-31 17:50:04 -07:00
msukkari
f62a492ab3 properly log zoekt index exec 2025-07-28 20:12:46 -07:00
Brendan Kellam
efb4eb984a
fix(gitlab): Add configurable query timeout to GitLab client (#390)
* fix

* changelog
2025-07-20 11:59:15 -07:00
Michael Sukkarieh
aac1d4529e
Add anonymous access option to core (#385)
* migrate anonymous access logic out of ee

* add anonymous access toggle

* handle anon toggle properly based on perms

* add forceEnableAnonymousAccess setting

* add docs for access settings

* change forceEnableAnonymousAccess to be an env var

* add FORCE_ENABLE_ANONYMOUS_ACCESS to list in docs

* add back the enablePublicAccess setting as deprecated

* add changelog entry

* fix build errors

* add news entry for anonymous access

* feedback
2025-07-19 14:04:41 -07:00
Gabriel Dugny
9b13492cb3
chore: Misc typos (UI, docs, code...), Makefile PATH with spaces (#369)
* chore: Fix misc typos (UI, docs, code...)

* chore(dev): Support PATH with spaces in Makefile

E.g. `Application Support` on MacOS

* chore: Typos in schema v2 description

* chore: more typos

* chore(dev): Add _typos.toml
2025-07-16 11:59:01 -07:00
drew-u410
d9d0146c48
[indexing] make retry configurable (#377) 2025-07-14 12:31:34 -07:00
Brendan Kellam
22d548e171
fix(search-contexts): Fix issue where a repository would not appear in a search context if it was created after the search context was created (#354)
## Problem

If a repository is added **after** a search context (e.g., a new repository is synced from the code host), then it will never be added to the context even if it should be included. The workaround is to restart the instance.

## Solution

This PR adds a call to re-sync all search contexts whenever a connection is successfully synced. This PR adds the `@sourcebot/shared` package that contains `syncSearchContexts.ts` (previously in web) and it's dependencies (namely the entitlements system).

## Why another package?

Because the `syncSearchContexts` call is now called from:
1. `initialize.ts` in **web** - handles syncing search contexts on startup and whenever the config is modified in watch mode. This is the same as before.
2. `connectionManager.ts` in **backend** - syncs the search contexts whenever a connection is successfully synced.

## Follow-up devex work
Two things:
1. We have several very thin shared packages (i.e., `crypto`, `error`, and `logger`) that we can probably fold into this "general" shared package. `schemas` and `db` _feels_ like they should remain separate (mostly because they are "code-gen" packages).
2. When running `yarn dev`, any changes made to the shared package will only get picked if you `ctrl+c` and restart the instance. Would be nice if we have watch mode work across package dependencies in the monorepo.
2025-06-17 14:04:25 -07:00
Brendan Kellam
cf8fdd94f6
chore: Move bitbucket dependency to backend from workspace root (#351) 2025-06-13 16:53:05 -07:00
Gabriel Dugny
e423b56f42
fix(gitlab): Properly handle auth for Gitlab project avatars (#345) 2025-06-11 09:33:53 -07:00
Michael Sukkarieh
1ea377e7d6
Clean up successful and failed jobs (#343)
* clean up

* annoying log nit

* feedback
2025-06-10 18:07:07 -07:00
Michael Sukkarieh
0f3cdb7dd7
Add repo index validation (#339)
* add repo index validation

* add entry to changelog
2025-06-06 13:15:27 -07:00
Brendan Kellam
27fb5ad294
feature: File explorer (#336) 2025-06-06 12:38:16 -07:00
Michael Sukkarieh
8dc41a22b9
Fix repo images in authed instance case and add manifest json (#332)
* wip fix repo images

* fix config imports

* add manifest json

* more logos for manifest

* add properly padded icon

* support old gitlab token case, simplify getImage action, feedback

* add changelog entry

* fix build error
2025-06-06 10:50:13 -07:00
Michael Sukkarieh
3b36ffa17e
Add support for structured logs (#323)
* wip on refactoring docs

* wip

* initial structured logs impl

* structured log docs

* create logger package

* add news entry for structured logging

* add logger package to dockerfile and cleanup

* add gh workflow for catching broken links

* further wip

* fix

* further wip on docs

* review feedback

* remove logger dep from mcp package

* fix build errors

* add back auth_url warning

* fix sidebar title consistency

---------

Co-authored-by: bkellam <bshizzle1234@gmail.com>
2025-06-02 11:16:01 -07:00
Michael Sukkarieh
60a3528394
V4 (#311)
Sourcebot V4 introduces authentication, performance improvements and code navigation. Checkout the [migration guide](https://docs.sourcebot.dev/self-hosting/upgrade/v3-to-v4-guide) for information on upgrading your instance to v4.

### Changed
- [**Breaking Change**] Authentication is now required by default. Notes:
  - When setting up your instance, email / password login will be the default authentication provider.
  - The first user that logs into the instance is given the `owner` role. ([docs](https://docs.sourcebot.dev/docs/more/roles-and-permissions)).
  - Subsequent users can request to join the instance. The `owner` can approve / deny requests to join the instance via `Settings` > `Members` > `Pending Requests`.
  - If a user is approved to join the instance, they are given the `member` role.
  - Additional login providers, including email links and SSO, can be configured with additional environment variables. ([docs](https://docs.sourcebot.dev/self-hosting/configuration/authentication)).
- Clicking on a search result now takes you to the `/browse` view. Files can still be previewed by clicking the "Preview" button or holding `Cmd` / `Ctrl` when clicking on a search result. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)

### Added
- [Sourcebot EE] Added search-based code navigation, allowing you to jump between symbol definition and references when viewing source files. [Read the documentation](https://docs.sourcebot.dev/docs/search/code-navigation). [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
- Added collapsible filter panel. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)

### Fixed
- Improved scroll performance for large numbers of search results. [#315](https://github.com/sourcebot-dev/sourcebot/pull/315)
2025-05-28 16:08:42 -07:00
Brendan Kellam
1aafc228cf
feat: Generic git host support (local & remote) (#307) 2025-05-15 13:42:58 -07:00
Brendan Kellam
fd65d78475
chore: Resolve DATA_CACHE_DIR in .env.development (#306) 2025-05-12 14:42:53 -07:00
securisec
55127f7dd9
Align gitea clone_url with gitea host url. Addresses #270 (#303)
Co-authored-by: Michael Sukkarieh <michael.sukkarieh@mail.mcgill.ca>
2025-05-12 12:38:27 -07:00
Brendan Kellam
e4e36bd745
fix: Fixed issue with repositories appearing in the carousel when indexing fails on first sync (#305) 2025-05-12 12:10:20 -07:00
Michael Sukkarieh
e64f37178a
Review Agent (#298)
* push review agent implementation

* feedback

* wip integrating review agent into monorepo

* move review agent to web

* feedback

* feedback

* add rate limit throttling to octokit

* configure agent ui in app

* docs

* add review command logic and add logging for review agent to data cache dir

* fix bug with llm returning multiple reviews in single invocation

* fix doc link bug

* feedback and improved docs for review agent

* review agent doc nits

* mcp doc nit
2025-05-12 12:10:01 -07:00
msukkari
13b7b352bd better error handling for git operations 2025-05-10 08:37:03 -07:00
Brendan Kellam
873c9ef2a4
Sourcebot MCP (#292) 2025-05-07 16:21:05 -07:00
Brendan Kellam
68265accbe
Fix auth with GitHub (#288) 2025-04-30 14:22:41 -07:00
Brendan Kellam
09894a5d7d
Add exclude.readOnly and exclude.hidden to gerrit connection config (#280) 2025-04-29 12:05:19 -07:00
Michael Sukkarieh
b6dedc78ba
Add Bitbucket support (#275)
* [wip] add bitbucket schema

* wip bitbucket support

* add support for pulling bitbucket repos and UI support for bitbucket

* fix bitbucket app password auth case

* add back support for multiple workspaces and add exclude logic

* add branches to bitbucket

* add bitbucket server support

* add docs for bitbucket and minor nits

* doc nits

* code rabbit fixes

* fix build error

* add bitbucket web ui support

* misc cleanups and fix ui issues with bitbucket connections

* add changelog entry
2025-04-25 11:22:40 -07:00
msukkari
5ba3b4b2c7 construct gerrit gitiles webUrl properly 2025-04-11 15:14:41 -06:00
msukkari
244afeadb8 add back names in logs for repo and connection sync 2025-04-10 21:17:57 -06:00
Brendan Kellam
21bbe09fc9
Add periodic connection re-sync (#260) 2025-04-03 17:51:01 -07:00
Brendan Kellam
bbd8b221d6
Display name improvements (#259) 2025-04-02 17:50:48 -07:00