Currently, for commit matches, we generate label and detail in the backend as markdown-formatted strings. This adds the information needed to generate these fields to the commit match stream type cuts markdown out of the loop.
* graphqlbackend: initial on-prem user invites collaborator discovery backend
This is the initial backend for on-prem user invites' collaborator discovery.
Unlike the one we use for Cloud signup, which uses the GitHub API to find
collaborators (because the repos are not yet cloned on Sourcegraph), this API
leverages gitserver instead since the repositories are cloned. We look at recent
committers from 25 of the users' most starred repositories.
This is quite fast, completing in under a few hundred milliseconds.
One drawback here, however, is that we do not get profile pictures currently.
Because these users do not exist on Sourcegraph, and we only have their email
address, we don't have any simple way to get their profile picture. The GitHub API
is not suitable for fetching this information, either, and so instead we fallback to Gravatar
images which are better than nothing.
Signed-off-by: Stephen Gutekanst <stephen@sourcegraph.com>
Potential solution to sourcegraph/customer#742 . Looks like GitHub has some odd behaviours related to teams called owners etc. that may cause "list repo" on an existing repo to return 404. A 404 is not transient, and retrying on a 404 will not make it un-404, so we allow these errors to persist to cache. I've added a docstring inline to explain why this is safe.
Co-authored-by: Molly Weitzel <molly.weitzel@sourcegraph.com>
Removed all uses outside of the database package.
Unexported it.
Removed all the mock fields apart from List as they weren't being used.
The final left over usages can be removed in another PR and are a bit
tricker since they are called from within another method on the
ExternalServiceStore interface.
* Extend API with remove insight method
* Add use insight remove hook
* Extend insight UI with remove from the dashboard action
* Fix gql query types generation
* Fix the main dashboard page padding problem
* Fix insight context menu layout and styles
* Fix position for the menu list popover
* Remove unused styles CSS class
This is a first iteration that simply outputs a report of the issues in
either markdown or text format of the issues created by missing test
plans or reviews.
The plan is to automate it as we refine the process in the upcoming
weeks.
Co-authored-by: Robert Lin <robert@bobheadxi.dev>
* Add "TourShown", "TourClosed" and "TourRestartClicked" event logs
* Update "Get started" button link to open on a new tab
* Rename "onboarding tour" prefix to "getting started tour" to avoid confusion w/ other search onboarding tour
* Cleanup old "search-notebook-onboarding" experiment
* Update CHANGELOG.md
* Add initial funcion and mutation for hard deleting an org - wip
* Add feature flag
* Fix wrong import
* Remove debug message
* Delete notebooks and settings before deleting an org
* Define removeOrganization in the schema.graphql instead of in org/backend.ts
* Clean some degug messages
* Only clean settings for On-prem
* Switch back to returning error when new feature flag is false
* Add some tests
* Add extra checks and more tests
* Update mocks, fix message
* Add test for happy path, fix wrong db variable that make mock fail
* Address PR reviewers suggestions - part 1
* Add missing manual deletion for the case where we don't have On Delete Cascade
* Remove debug message
* Check if org exists before running any query
* Edit error message
* Address more suggestions from the PR reviewers
* Avoid repeting so many delete statements
* Remove debug messages
* Use deleteOrganization and add a new arg to it instead of creating a new function
* Remove leftover
* Use sqlf.Sprintf and add security comment
* Regenerate mocks
* Re-re-generate mocks
* Use helper methods for soft/hard delete, update unit tests
* Unmarshal orgID only if user can soft delete org
* Add initial funcion and mutation for hard deleting an org - wip
* Add feature flag
* Fix wrong import
* Remove debug message
* Delete notebooks and settings before deleting an org
* Define removeOrganization in the schema.graphql instead of in org/backend.ts
* Clean some degug messages
* Only clean settings for On-prem
* Switch back to returning error when new feature flag is false
* Add some tests
* Add extra checks and more tests
* Update mocks, fix message
* Add test for happy path, fix wrong db variable that make mock fail
* Address PR reviewers suggestions - part 1
* Add missing manual deletion for the case where we don't have On Delete Cascade
* Remove debug message
* Check if org exists before running any query
* Edit error message
* Address more suggestions from the PR reviewers
* Avoid repeting so many delete statements
* Remove debug messages
* Use deleteOrganization and add a new arg to it instead of creating a new function
* Remove leftover
* Use sqlf.Sprintf and add security comment
* Regenerate mocks
* Re-re-generate mocks
* Use helper methods for soft/hard delete, update unit tests
* Detect IDE extension usage and store the results in a user's temporary settings
* Add test and document working URLs
* Fix failing tests
* Use React Router for location detection and proper temporary settings test utils
* Remove workaround for unstable temporary settings updater (requires #32266)
* Remove leftover && true
* Change deps array