From 4f83a3a026b17a6a5533d8f8be2a5033c8ed8302 Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Thu, 19 Feb 2026 10:53:05 +0000 Subject: [PATCH 1/6] Update own documentation --- docs/own/assigned-ownership.mdx | 96 ---------------------------- docs/own/codeowners-format.mdx | 8 --- docs/own/codeowners-ingestion.mdx | 57 ----------------- docs/own/configuration-reference.mdx | 58 ----------------- docs/own/index.mdx | 51 ++------------- src/data/navigation.ts | 12 ---- 6 files changed, 5 insertions(+), 277 deletions(-) delete mode 100644 docs/own/assigned-ownership.mdx delete mode 100644 docs/own/codeowners-ingestion.mdx delete mode 100644 docs/own/configuration-reference.mdx diff --git a/docs/own/assigned-ownership.mdx b/docs/own/assigned-ownership.mdx deleted file mode 100644 index f68f08638..000000000 --- a/docs/own/assigned-ownership.mdx +++ /dev/null @@ -1,96 +0,0 @@ -# Assigned ownership - -Owners (both users and teams) can be manually assigned. Assignment can be done on a repository, directory or a file level. - -Assigned ownership propagates in a top-down manner: e.g. - -- If an owner is assigned to the repository, they will be considered an owner for all files and directories of this repository. -- If an owner is assigned to some directory (e.g. `repo-name/src/abc`) within the repo, they will be considered an owner for all the directories and files within `repo-name/src/abc`, but not for any other directories and files higher up in the hierarchy. -- If an owner is assigned to some file (e.g. `repo-name/src/abc/a.go`) within the repo, they will be considered an owner only for this file. - -## Who can assign ownership - -Only site admins can assign ownership by default. For other users, [RBAC should be used](/admin/access-control/ownership) to grant assign ownership right. -[More](/admin/access-control) about RBAC in Sourcegraph. - -## How to assign ownership - -### Repository level ownership - -Go to the repository page and click "Ownership" button. - -![Repository page with Ownership button selected](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-ownership-1-dark.png) - -1. Click "Add owner" button, the modal window will open. -2. Activate "New owner" panel. -3. Search for the user/team to assign ownership to. -4. Click "Add owner" button on the modal window. - -![Add repository owner](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-2-dark.png) - -Owner is assigned successfully. - -![Repository owner added](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-3-dark.png) - -### Directory level ownership - -Go to any directory view (in our example it is `cmd/gitserver/internal`) and click "Show more" on Own panel. - -![Repository page with Ownership button selected](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-dir-1-dark.png) - -1. Click "Add owner" button, the modal window will open. -2. Activate "New owner" panel. -3. Search for the user/team to assign ownership to. -4. Click "Add owner" button on the modal window. - -![Add repository owner](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-2-dark.png) - -Owner is assigned successfully. - -![Repository owner added](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-3-dark.png) - -### File level ownership - -Go to the blob view of any file (in our example it is `cmd/gitserver/internal/cleanup.go`). - -1. Click on the Own bar in the top-right corner. -2. Click "Add owner" button in the bottom-right corner of an opened Ownership tab. -3. Activate "New owner" panel. -4. Search for the user/team to assign ownership to. -5. Click "Add owner" button on the modal window. - -![Add repository owner](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-dir-2-dark.png) - -Owner is assigned successfully. - -![Repository owner added](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-dir-3-dark.png) - -## How to remove an assigned owner - -### Repository and directory level - -Go to the repository page and click "Ownership" button **or** Go to any directory view and click "Show more" on Own panel. - -Click on "Remove ownership" button. - -![Repository/directory owner removed](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-remove-repo-1-dark.png) - -### File level - -Go to the blob view of any file and to the Ownership tab. - -Click on "Remove ownership" button. - -![File owner removed](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-remove-file-1-dark.png) - -### Note on removing assigned owners - -Owners can be removed only at the same level they were initially assigned. For example: - -- If an owner is assigned to the repository, they should be removed from the repository level. They cannot be removed from any directory/file within this repo, even though they are considered owners of these directories/files. -- If an owner is assigned to some directory within the repo, they should be removed from the same directory. They cannot be removed from any subdirectory/file below this directory, even though they are considered owners of these subdirectories/files. -- If an owner is assigned to some file within the repo, they should be removed from the same file. - -**"Remove ownership" buttons are disabled and the tooltip is shown when a user is attempting to remove an owner from the different place from where this owner has been assigned.** - -![Remove ownership disabled tooltip](https://storage.googleapis.com/sourcegraph-assets/docs/own/assigned-owners-cannot-remove-dark.png) diff --git a/docs/own/codeowners-format.mdx b/docs/own/codeowners-format.mdx index 5eced2c79..fc7233561 100644 --- a/docs/own/codeowners-format.mdx +++ b/docs/own/codeowners-format.mdx @@ -60,11 +60,3 @@ docs/CODEOWNERS ``` Searches at specific commits will return any `CODEOWNERS` data that exists at that specific commit. - -## Uploading a `CODEOWNERS` file to Sourcegraph - -> Use this approach if you don't want to commit `CODEOWNERS` files to your repos, or if you have an existing system that tracks ownership data and want to sync that data with Sourcegraph. - -Read more on how to [manually ingest `CODEOWNERS` data](/own/codeowners-ingestion) into your Sourcegraph instance. - -The [docs](/own/codeowners-ingestion) detail how to use the UI or `src-cli` to upload `CODEOWNERS` files to Sourcegraph. diff --git a/docs/own/codeowners-ingestion.mdx b/docs/own/codeowners-ingestion.mdx deleted file mode 100644 index 4b5a74b24..000000000 --- a/docs/own/codeowners-ingestion.mdx +++ /dev/null @@ -1,57 +0,0 @@ -# Codeowners ingestion - -This feature is in beta. - -Code ownership allows you to surface ownership data using `CODEOWNERS` files. -This is done automatically if there is a committed `CODEOWNERS` file in your repository at any of the following locations: - -```md -CODEOWNERS -.github/CODEOWNERS -.gitlab/CODEOWNERS -docs/CODEOWNERS -``` - -However, it might be you do not want to have a `CODEOWNERS` file committed to your repository (for example, to avoid automatic review requests), or you would like to overwrite the existing one. - -Sourcegraph provides a UI and CLI to ingest a `CODEOWNERS` file per-repository, that overrides any existing committed file. - -You can ingest one `CODEOWNERS` file per repository. -At this time the same ingested `CODEOWNERS` file applies to all revisions. - -## Ingesting a file through the UI - -Navigating to any repository page, clicking the Ownership button will surface information about any ingested `CODEOWNERS` file, and will allow you to upload or update an existing one. - -![Codeowners ingestion UI on sourcegraph/sourcegraph](https://storage.googleapis.com/sourcegraph-assets/docs/images/own/codeowners_ingestion_ui.png) - -## Ingesting a file with src-cli - -There is the option to ingest data with the Sourcegraph [src-cli](/cli/quickstart). -The CLI provides `add`, `update`, `delete`, and `list` functionality. - -```bash -'src codeowners' is a tool that manages ingested code ownership data in a Sourcegraph instance. - -Usage: - - src codeowners command [command options] - -The commands are: - - get returns the codeowners file for a repository, if exists - create create a codeowners file - update update a codeowners file - delete delete a codeowners file - -Use "src codeowners [command] -h" for more information about a command. -``` - -The input file can be written inline or passed in. - -## Limitations - -- Uploaded `CODEOWNERS` files must use either Sourcegraph usernames or email addresses for correct user matching to occur. `CODEOWNERS` files committed to the repo should use either usernames of the codehost the repo is on (e.g. GitHub) or email addresses. -- The file should respect `CODEOWNERS` formatting for code ownership to surface useful information. No formatting validation is done at upload time. -- Only site admins can add, update or delete a `CODEOWNERS` file through the ingestion API. -- Ingested `CODEOWNERS` files are limited to a size of 10Mb if uploaded through the client. diff --git a/docs/own/configuration-reference.mdx b/docs/own/configuration-reference.mdx deleted file mode 100644 index a19ae0e3b..000000000 --- a/docs/own/configuration-reference.mdx +++ /dev/null @@ -1,58 +0,0 @@ -# Configuration reference - -## Ownership signals and background compute - -Ownership signals are used to guide the assignment of ownership. These are: - -- **Recent contributors signal** counts files modified by commits in the last 90 days. -- **Recent views signal** counts file views within Sourcegraph in the last 90 days. - -Both of these signals are computed by background tasks. -The values of signals are aggregated and bubble up the file tree. -That is, for the Ownership data displayed `/a/` directory, all descendant file signals contribute. -For instance contributions and views of `/a/b/c.go`. - -The **Site admin > Code graph > Ownership signals** page allows enabling and disabling each signal individually. -These need to be explicitly enabled by site admin in order for signals to surface in the UI. - -![Site admin ownership configuration page](https://sourcegraphstatic.com/own-signals-configuration-dark.png) - -### Repository filtering - -In some cases ownership signals need to be disabled for specified repositories: - -- Ownership signals are not desired for certain repositories. -- Computing signals is expensive due to size of some repositories. - -**Exclude repositories** section under each signal in **Site admin > Code graph > Ownership signals** allows to match repositories to exclude from computing ownership signals. -Materialized list of excluded repositories is displayed for feedback. - -![Site admin ownership configuration page](https://sourcegraphstatic.com/own-signals-exclude-dark.png) - -## Analytics - -In order to measure how many files have owners, Sourcegraph exposes analytics through **Site admin > Analytics > Own**. -These present percentage of files that have: - -- Any ownership associated, -- assigned ownership (through the UI), -- ownership via matching rule in CODEOWNERS file. - -Analytics data is computed periodically. -The background process for computing analytics data has to be enabled explicitly through **Site admin > Code graph > Ownership signals**. -This is because the process can become computationally expensive. - -## Assigned ownership access control - -In order to grant users the ability to assign ownership, please use [ownership permission](/admin/access-control/ownership) in role-based access control. -This is a coarse-grained permission, allowing users to assign ownership throughout the instance. -At this point there is no finer-grained ownership assigning access control. - -## Disabling ownership in the UI - -Ownership data is displayed in various places in Code search user interface, among others: - -- in a card on repository and directory pages, -- in a top bar on file page. - -If needed, the visibility of ownership data embedded in Code search UI can be disabled by creating a boolean feature flag `enable-ownership-panels` and setting its value to `false`. diff --git a/docs/own/index.mdx b/docs/own/index.mdx index 04dcfc919..796103e7c 100644 --- a/docs/own/index.mdx +++ b/docs/own/index.mdx @@ -1,51 +1,31 @@ # Code ownership -This feature is in beta. - -Code ownership is aimed at helping find the right person and team to contact, for any question, at any time. We are starting out with code ownership, ownership inference and assignments and are exploring ways to help you find someone to answer _every_ question. +Code ownership is aimed at helping find the right person and team to contact, for any question, at any time. ## Concepts -**Owner**: An owner is defined as a person or a team in Sourcegraph. +**Owner**: An owner is defined as a person in Sourcegraph. A _person_ can be: - a Sourcegraph user which we were able to resolve from the `CODEOWNERS` handle or email, in which case we link to their profile. - an unknown user for which we were unable to resolve a profile, in which case we will return the `CODEOWNERS` data we have. -A _team_ is a group of Sourcegraph users represented by a common handle, which is a new feature that we added. -[Read more about how to manage teams in Sourcegraph](/admin/teams/). - ## Code ownership -Code ownership is set in 2 different ways: - -- [The `CODEOWNERS` format](/own/codeowners-format) -- [Assigned ownership](/own/assigned-ownership) +Code ownership is set via [the `CODEOWNERS` format](/own/codeowners-format). ## Limitations -- Code ownership support has been released as an MVP for 5.0. In the future of the product we intend to infer ownership beyond `CODEOWNERS` data. - The feature has not been fully validated to work well on large repositories or large `CODEOWNERS` rulesets. This is a future area of improvement, but please contact us if you run into issues. ## Browsing ownership The ownership information is available for browsing once ownership data is available through [a `CODEOWNERS` file](#code-ownership). -When displaying a source file, there is a bar above the file contents. - -- On the left-hand side, it displays the most recent change to the file. -- On the right-hand side it displays the code ownership bar with at most 2 file owners. Any additional number of owners is also displayed. - -![File view showing code ownership bar on the right hand side above the file contents](https://storage.googleapis.com/sourcegraph-assets/docs/own/blob-view.png) +When displaying a source file, there is an "Owernship" button at the bottom. Clicking it will open the "Owernship" panel. -After clicking on the code ownership bar, a bottom panel appears listing all the owners. - -![File view with the ownership tab selected in the bottom panel](https://storage.googleapis.com/sourcegraph-assets/docs/own/blob-view-panel.png) - -There is always a single rule in a `CODEOWNERS` file that determines ownership (if any). Each owner listed in the bottom panel has a description found by clicking the collapsible arrow: _Owner is associated with a rule in a `CODEOWNERS` file_. Clicking this description links to the line containing the responsible rule in the `CODEOWNERS` file. - -If any email information has been found for the owner, clicking the mail icon will start an email to them. +![File view with the ownership tab selected in the bottom panel](https://storage.googleapis.com/sourcegraph-assets/docs/own/blob-view-panel-v2.png) ## Ownership search @@ -70,29 +50,8 @@ To find all commits between versions `5.0` and `5.1` made by `sourcegraph/own` t `repo:^github\.com/sourcegraph/sourcegraph$@5.1:^5.0 type:commit file:has.owner(sourcegraph/own)` -Same query can be run for any owner (a person or a team). - -## Troubleshooting - -### Memory issues and worker crashes - -The Own background processes (such as ownership signals computation) can consume significant memory, potentially causing worker jobs to crash due to excessive memory usage. If you experience memory problems or worker crashes related to Own: - -1. **Disable ownership signals**: Go to **Site admin > Code graph > Ownership signals** and disable the signals that are causing issues: - - - Recent contributors signal - - Recent views signal - - Analytics computation - -2. **Exclude large repositories**: Use the repository filtering options to exclude large repositories from ownership signal computation. - -3. **Monitor resource usage**: Check your instance's memory usage after disabling signals to confirm the issue is resolved. - -If memory issues persist after disabling ownership features, consider whether Own functionality is essential for your use case. - ## Further reading In order to learn more please check out our references: - [CODEOWNERS format](/own/codeowners-format) - Guide to using the CODEOWNERS file format to define ownership -- [Configuration](/own/configuration-reference) - Full list of ownership configuration options diff --git a/src/data/navigation.ts b/src/data/navigation.ts index 98368191d..d00c56f38 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -412,18 +412,6 @@ export const navigation: NavigationItem[] = [ title: 'CODEOWNERS Format', href: '/own/codeowners-format' }, - { - title: 'CODEOWNERS Ingestion', - href: '/own/codeowners-ingestion' - }, - { - title: 'Configuration Reference', - href: '/own/configuration-reference' - }, - { - title: 'Assigned Ownership', - href: '/own/assigned-ownership' - } ] }, { From 060e9d6087f96baf439304fa4bdd6f277f72412e Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Fri, 20 Feb 2026 08:24:25 +0000 Subject: [PATCH 2/6] Remove teams and ownership access control pages --- docs/admin/access-control/index.mdx | 1 - docs/admin/access-control/ownership.mdx | 7 -- docs/admin/index.mdx | 1 - docs/admin/teams.mdx | 113 ------------------------ 4 files changed, 122 deletions(-) delete mode 100644 docs/admin/access-control/ownership.mdx delete mode 100644 docs/admin/teams.mdx diff --git a/docs/admin/access-control/index.mdx b/docs/admin/access-control/index.mdx index 98652e757..87382e8f3 100644 --- a/docs/admin/access-control/index.mdx +++ b/docs/admin/access-control/index.mdx @@ -42,7 +42,6 @@ To edit the permissions granted to a role, click the role to expand it, then sel You can read about the specific permission types available for each RBAC-enabled product area below: - [Batch Changes](/admin/access-control/batch-changes) -- [Ownership](/admin/access-control/ownership) - [Service accounts](/admin/service-accounts) ### Deleting a role diff --git a/docs/admin/access-control/ownership.mdx b/docs/admin/access-control/ownership.mdx deleted file mode 100644 index 9258e22a5..000000000 --- a/docs/admin/access-control/ownership.mdx +++ /dev/null @@ -1,7 +0,0 @@ -# Access control for Ownership - -Granular controls for who can assign [Ownership](/own/) can be configured by site admins by tuning the roles assigned to users and the permissions granted to those roles. This page describes the permission types available for Ownership, and whether they are granted by default to the **User** [system role](/admin/access-control/#system-roles). All permissions are granted to the **Site Administrator** system role by default. - -| Name | Description | Granted to **User** by default? | -| ------------------- | ---------------------------------------------------------------------------- | :-----------------------------: | -| `ownerships:assign` | Assign ownership to users and teams on repository, directory and file levels | ✗ | diff --git a/docs/admin/index.mdx b/docs/admin/index.mdx index 608dbc753..7f47826d0 100644 --- a/docs/admin/index.mdx +++ b/docs/admin/index.mdx @@ -64,6 +64,5 @@ Sourcegraph administration is primarily managed by site administrators, who are - [Configure search scopes](/code-search/working/snippets) - [Integrate with Phabricator](/integration/phabricator) - [Add organizations](/admin/organizations) -- [Add teams](/admin/teams) (Experimental) - [Configuring rate limits](/admin/code-hosts/rate-limits) - [Configuring command recording](/admin/repo/recording) diff --git a/docs/admin/teams.mdx b/docs/admin/teams.mdx deleted file mode 100644 index ea902b21e..000000000 --- a/docs/admin/teams.mdx +++ /dev/null @@ -1,113 +0,0 @@ -# Modeling teams in Sourcegraph - - - This feature is in Experimental stage and might change in the future. - - -Teams in Sourcegraph are groups of users with a common handle. Teams are structured as a tree, so teams can have child teams. - -Example team structure that can be modeled: - -``` -Engineering -├─ Security -├─ Code Graph -│ ├─ Batch Changes -│ ├─ Code Insights -├─ source -│ ├─ Repo Management -│ ├─ IAM -Product -``` - -Teams in Sourcegraph are usable in [code ownership](/own/), and other features in the future. Teams can be code owners and will influence the code ownership experience. You can search for code owned by a specific team, and in the future advanced ownership analytics will be informed by given team structures. - -## Configuring teams - -Teams can either be defined directly in Sourcegraph, or be ingested from external systems into Sourcegraph using [src-cli](https://github.com/sourcegraph/src-cli). A team name must be globally unique, and the global namespace for names is shared among users, teams, and orgs. - -### From the UI - -Go to **Teams** from the user navbar item. On this page, click "Create team". A team needs to have a unique name and can optionally take a display name. Additionally, you can add a parent team to build a tree structure as outlined above. - -After hitting create, you will be redirected to the team page where you can add Sourcegraph users as team members. - -> NOTE: It's common to define teams in Sourcegraph from a third party system. Teams defined from src-cli using the `-read-only` flag cannot be modified from the UI to prevent state drift from external systems. - -### From the CLI - -If you prefer a command line based approach, or would like to integrate an external system of record for teams into Sourcegraph, [src-cli](https://github.com/sourcegraph/src-cli) provides commands to manage teams: - -```bash -# List configured teams. Lists root teams, using -parent-team can read child teams. -src teams list [-query=] [-parent-team=] - -# Create a new team. -src teams create -name= [-display-name=] [-parent-team=] [-read-only] - -# Update a team. -src teams update -name= [-display-name=] [-parent-team=] - -# Delete a team. -src teams delete -name= - -# List team members. -src teams members list -name= [-query=] - -# Add a new team member. See user account matching for details on how this works. -src teams members add -team-name= [-email=] [-username=] [-id=] [-external-account-service-id= -external-account-service-type= [-external-account-account-id=] [-external-account-login=]] [-skip-unmatched-members] - -# Remove a team member. See user account matching for details on how this works. -src teams members remove -team-name= [-email=] [-username=] [-id=] [-external-account-service-id= -external-account-service-type= [-external-account-account-id=] [-external-account-login=]] [-skip-unmatched-members] -``` - -#### User account matching - -Matching a user account in Sourcegraph from an external system can be achieved in a few different ways: Sourcegraph User ID, Sourcegraph account email, Sourcegraph username or an explicit external-account mapping can be provided. - -The matching order is as follows: - -- try Sourcegraph user ID -- then try email -- then try username -- then try external-account - -Example for external account matching with configured GitHub auth provider: - -```bash -# Match a user with the account ID 123123123: -src teams members add \ - -team-name='engineering' \ - -external-account-service-id='https://github.com/' \ - -external-account-service-type='github' \ - -external-account-account-id='123123123' -# Match a user with the GitHub login handle alice: -src teams members add \ - -team-name='engineering' \ - -external-account-service-id='https://github.com/' \ - -external-account-service-type='github' \ - -external-account-login='alice' -``` - -### Permissions in teams - -For now, team permissions are based on membership. Read-only teams are only editable by site-admins. The creator of a team can always modify it, even if they are not a member of it. - -| **Action** | **Site-admin** | **Regular user** | **Direct team member** | -| :-------------------------------------: | :------------: | :--------------: | :--------------------: | -| Reading teams, metadata and members | 🟢 | 🟢 | 🟢 | -| Creating a new team | 🟢 | 🟢 | n/a | -| Creating a new child team | 🟢 | 🔴 | 🟢 | -| Creating a new read-only team | 🟢 | 🔴 | n/a | -| Updating team details/metadata | 🟢 | 🔴 | 🟢 | -| Deleting a team | 🟢 | 🔴 | 🟢 | -| Deleting a read-only team | 🟢 | 🔴 | 🔴 | -| Adding a member to a team | 🟢 | 🔴 | 🟢 | -| Removing a member from a team | 🟢 | 🔴 | 🟢 | -| Adding a member to a read-only team | 🟢 | 🔴 | 🔴 | -| Removing a member from a read-only team | 🟢 | 🔴 | 🔴 | - -### Known limitations - -- Read-only teams can only be created by site-admins -- Identity Provider / SCIM integrations are not available at the moment From dcfb73510cf1fb3de414a163a0adb769d0f4c67d Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Fri, 20 Feb 2026 08:24:53 +0000 Subject: [PATCH 3/6] Rename own -> code-ownership --- docs/{own => code-ownership}/codeowners-format.mdx | 0 docs/{own => code-ownership}/index.mdx | 4 ++-- docs/code-search/queries/index.mdx | 2 +- docs/technical-changelog.mdx | 4 ++-- src/data/navigation.ts | 4 ++-- src/data/redirects.ts | 11 +++++++++++ 6 files changed, 18 insertions(+), 7 deletions(-) rename docs/{own => code-ownership}/codeowners-format.mdx (100%) rename docs/{own => code-ownership}/index.mdx (91%) diff --git a/docs/own/codeowners-format.mdx b/docs/code-ownership/codeowners-format.mdx similarity index 100% rename from docs/own/codeowners-format.mdx rename to docs/code-ownership/codeowners-format.mdx diff --git a/docs/own/index.mdx b/docs/code-ownership/index.mdx similarity index 91% rename from docs/own/index.mdx rename to docs/code-ownership/index.mdx index 796103e7c..6eb3a79ba 100644 --- a/docs/own/index.mdx +++ b/docs/code-ownership/index.mdx @@ -13,7 +13,7 @@ A _person_ can be: ## Code ownership -Code ownership is set via [the `CODEOWNERS` format](/own/codeowners-format). +Code ownership is set via [the `CODEOWNERS` format](/code-ownership/codeowners-format). ## Limitations @@ -54,4 +54,4 @@ To find all commits between versions `5.0` and `5.1` made by `sourcegraph/own` t In order to learn more please check out our references: -- [CODEOWNERS format](/own/codeowners-format) - Guide to using the CODEOWNERS file format to define ownership +- [CODEOWNERS format](/code-ownership/codeowners-format) - Guide to using the CODEOWNERS file format to define ownership diff --git a/docs/code-search/queries/index.mdx b/docs/code-search/queries/index.mdx index 6beb9f05a..b8dfa9f3b 100644 --- a/docs/code-search/queries/index.mdx +++ b/docs/code-search/queries/index.mdx @@ -85,7 +85,7 @@ The following filters can be used on all searches (using [RE2 syntax](https://go | **repo:has.commit.after(...)** | Filter out stale repositories that don't contain commits past the specified time frame. See [built-in predicates](/code-search/queries/language#built-in-repo-predicate) for more | [`repo:has.commit.after(yesterday)`](https://sourcegraph.com/search?q=context:global+repo:.*sourcegraph.*+repo:has.commit.after%28yesterday%29&patternType=keyword)
[`repo:has.commit.after(june 25 2017)`](https://sourcegraph.com/search?q=context:global+repo:.*sourcegraph.*+repo:has.commit.after%28june+25+2017%29&patternType=keyword) | | **rev:at.time(...)** | Search a repo or a branch at a specific point in time. | [`rev:at.time(1 year ago)`](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+rev:at.time%281+year+ago%29+&patternType=keyword&sm=0)
[`rev:at.time(2021-01-01)`](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/sourcegraph/sourcegraph%24+rev:at.time%282021-01-01%2C+v5.0.0%29+&patternType=keyword) | | **file:has.content(...)** | Conditionally search files only if they contain contents that match the provided regex pattern. See [built-in predicates](/code-search/queries/language#built-in-repo-predicate) for more | [`file:has.content(Copyright) Sourcegraph`](https://sourcegraph.com/search?q=context:global+file:has.content%28Copyright%29+Sourcegraph&patternType=keyword) | -| **file:has.owners(...)** | **Beta** Conditionally search files only if they are owned by the given owner. Empty means _any owner_. See [code ownership documentation](/own) for more | [`file:has.owner(alice@sourcegraph.com) Sourcegraph`](https://sourcegraph.com/search?q=context:global+file:has.owner%28alice@sourcegraph.com%29+Sourcegraph&patternType=keyword) | +| **file:has.owners(...)** | Conditionally search files only if they are owned by the given owner. Empty means _any owner_. See [code ownership documentation](/code-ownership) for more | [`file:has.owner(alice@sourcegraph.com) Sourcegraph`](https://sourcegraph.com/search?q=context:global+file:has.owner%28alice@sourcegraph.com%29+Sourcegraph&patternType=keyword) | | **file:has.contributor(...)** | Conditionally search files only if a file contributor's name or email matches the provided regex pattern. See [built-in predicates](/code-search/queries/language#built-in-file-predicate) for more | [`file:has.contributor(alice@sourcegraph.com) Sourcegraph`](https://sourcegraph.com/search?q=context:global+file:has.owner%28alice@sourcegraph.com%29+Sourcegraph&patternType=keyword) | | **count:_N_,< /> count:all** | Retrieve N results. By default, Sourcegraph stops searching early and returns if it finds a full page of results. This is desirable for most interactive searches. To wait for all results, use **count:all** | [`count:1000 function`](https://sourcegraph.com/search?q=count:1000+repo:sourcegraph/sourcegraph$+function)
[`count:all err`](https://sourcegraph.com/search?q=repo:github.com/sourcegraph/sourcegraph+err+count:all&patternType=keyword) | | **timeout:_go-duration-value_** | Customizes the timeout for searches. The value of the parameter is a string that can be parsed by the [Go time package's `ParseDuration`](https://golang.org/pkg/time/#ParseDuration) (e.g. 10s, 100ms). By default, the timeout is set to 10 seconds, and the search will optimize for returning results as soon as possible. The timeout value cannot be set longer than 1 minute. When provided, the search is given the full timeout to complete | [`repo:^github.com/sourcegraph timeout:15s func count:10000`](https://sourcegraph.com/search?q=repo:%5Egithub.com/sourcegraph/+timeout:15s+func+count:10000) | diff --git a/docs/technical-changelog.mdx b/docs/technical-changelog.mdx index adbbca44e..bbb202928 100644 --- a/docs/technical-changelog.mdx +++ b/docs/technical-changelog.mdx @@ -12121,7 +12121,7 @@ The following PRs were merged onto the previous release branch but could not be - Ping data now reflects whether `cody.enabled` and `completions` are set. - If a Sourcegraph request is traced, its trace ID and span ID are now set to the `X-Trace` and `X-Trace-Span` response headers respectively. The trace URL (if a template is configured in `observability.tracing.urlTemplate`) is now set to `X-Trace-URL` - Previously, the URL was set to `X-Trace`. [#53259](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/53259) - For users using the single-container server image with the default built-in database, the database must be reindexed. This process can take up to a few hours on systems with large datasets. [#53256](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/53256) -- [Sourcegraph Own](/own) is now available as a beta enterprise feature. `search-ownership` feature flag is removed and doesn't need to be used. +- [Sourcegraph Own](/code-ownership) is now available as a beta enterprise feature. `search-ownership` feature flag is removed and doesn't need to be used. - Update Jaeger to 1.45.0, and Opentelemetry-Collector to 0.75.0 [#54000](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/54000) - Switched container OS to Wolfi for hardened containers [#47182](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/47182), [#47368](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/47368) - Batches changes now supports for CODEOWNERS for Github. Pull requests requiring CODEOWNERS approval, will no longer show as approved unless explicitly approved by a CODEOWNER. https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/53601 @@ -12270,7 +12270,7 @@ The following PRs were merged onto the previous release branch but could not be - [Role- Access Control](/admin/access-control) is now available as an enterprise feature (in Beta). It is currently only supported for Batch Changes functionality. [#43276](https://github.com/sourcegraph/sourcegraph-public-snapshot/issues/43276) - Site admins can now [restrict creation of batch changes to certain u[sers](/admin/access-control/batch-changes) by tailoring their roles and the permissions granted to those )roles. [#34491](https://github.com/sourcegraph/sourcegraph-public-snapshot/issues/34491) - Site admins can now [configure outgoing webh[ooks](/admin/webhooks/outgoing) for Batch Changes to inform external tools of events related to Sourceg)raph batch changes and their changesets. [#38278](https://github.com/sourcegraph/sourcegraph-public-snapshot/issues/38278) -- [Sourcegraph[ Own](/own) is now available as an experimental enterprise feature. Enable the `search-ownership` fe)ature flag to use it. +- [Sourcegraph[ Own](/code-ownership) is now available as an experimental enterprise feature. Enable the `search-ownership` fe)ature flag to use it. - Gitserver supports a new `COURSIER_CACHE_DIR` env var to configure the cache location for coursier JVM package repos. - Pings now emit a histogram of repository sizes cloned by Sourcegraph [48211](https://github.com/sourcegraph/sourcegraph-public-snapshot/pull/48211). - The search input has been redesigned to greatly improve usability. New contextual suggestions help users learn the Sourcegraph query language as they search. Suggestions have been unified across contexts and filters, and the history mode has been integrated into the input. Improved and expanded keyboard shortcuts also make navigation much easier. This functionality is in beta, and can be disabled in the user menu. diff --git a/src/data/navigation.ts b/src/data/navigation.ts index d00c56f38..4254dabe2 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -406,11 +406,11 @@ export const navigation: NavigationItem[] = [ }, { title: 'Code Ownership', - href: '/own', + href: '/code-ownership', sections: [ { title: 'CODEOWNERS Format', - href: '/own/codeowners-format' + href: '/code-ownership/codeowners-format' }, ] }, diff --git a/src/data/redirects.ts b/src/data/redirects.ts index ed00c1ce4..ad36f538c 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -7094,6 +7094,17 @@ const redirectsData = [ source: '/self-hosted/updates/server', destination: 'https://sourcegraph.com/changelog/self-hosted/server', permanent: true + }, + // code ownership redirects + { + source: '/own', + destination: '/code-ownerhsip', + permanant: true, + }, + { + source: '/own/codeowners-format', + destination: '/code-ownerhsip/codeowners-format', + permanant: true, } ]; From bc835914b830dd4bc08cb8e0f95d2c52d82f5e40 Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Sun, 22 Feb 2026 13:42:58 +0100 Subject: [PATCH 4/6] Update redirects.ts Co-authored-by: Erik Seliger --- src/data/redirects.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/redirects.ts b/src/data/redirects.ts index ad36f538c..1c38afb33 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -7103,7 +7103,7 @@ const redirectsData = [ }, { source: '/own/codeowners-format', - destination: '/code-ownerhsip/codeowners-format', + destination: '/code-ownership/codeowners-format', permanant: true, } ]; From 2352b038c6dcc68884c2afde8c812c88cefb43f2 Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Sun, 22 Feb 2026 13:43:04 +0100 Subject: [PATCH 5/6] Update redirects.ts Co-authored-by: Erik Seliger --- src/data/redirects.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/redirects.ts b/src/data/redirects.ts index 1c38afb33..ccb77f453 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -7098,7 +7098,7 @@ const redirectsData = [ // code ownership redirects { source: '/own', - destination: '/code-ownerhsip', + destination: '/code-ownership', permanant: true, }, { From 1ae8b97c2fe45d52f7e77cb49fc3ea309e77c681 Mon Sep 17 00:00:00 2001 From: Felix Kling Date: Sun, 22 Feb 2026 20:15:17 +0000 Subject: [PATCH 6/6] Add redirects for removed own pages --- src/data/redirects.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/data/redirects.ts b/src/data/redirects.ts index ccb77f453..923504a75 100644 --- a/src/data/redirects.ts +++ b/src/data/redirects.ts @@ -7101,6 +7101,21 @@ const redirectsData = [ destination: '/code-ownership', permanant: true, }, + { + source: '/own/assigned-ownership', + destination: '/code-ownership', + permanant: true, + }, + { + source: '/own/configuration-reference', + destination: '/code-ownership', + permanant: true, + }, + { + source: '/own/codeowners-ingestion', + destination: '/code-ownership', + permanant: true, + }, { source: '/own/codeowners-format', destination: '/code-ownership/codeowners-format',