Sourcegraph extensions have been deprecated with the September 2022 Sourcegraph release. Learn more.
The repo and the docs below are kept to support older Sourcegraph versions.
A Sourcegraph extension that shows code owners of the current file.
➕ Add to Sourcegraph (see usage instructions for self-hosted Sourcegraph instances)
Works on Sourcegraph.com, self-hosted Sourcegraph instances, and on code hosts (via the Sourcegraph browser extension).
- Displays Code owner(s) of current file when hover on the extension icon in the Sourcegraph extension panel.
- Code owner(s) of current file displayed in the file header on Code Hosts.
Only CODEOWNERS
and .github/CODEOWNERS
files are supported right now. File an issue if you want need support for another code ownership scheme.
Note: Using this extension on private code in the Sourcegraph browser extension requires a self-hosted Sourcegraph instance (because it needs access to the repository's files that define code owners).
- Enable the
sourcegraph/code-ownership
extension:- On Sourcegraph.com, visit https://sourcegraph.com/extensions/sourcegraph/code-ownership to enable it.
- On a self-hosted Sourcegraph instance, select User menu > Extensions, search for
sourcegraph/code-ownership
, and enable it.
- Visit any code file in a repository containing a
CODEOWNERS
or.github/CODEOWNERS
file. - Hover on the extension icon in the Sourcegraph extension panel to see the current file's code owner(s).
This extension adds the same features on your code host if you're using the Sourcegraph browser extension. To use it on your code host:
- Install the Sourcegraph browser extension.
- If you're using it with a self-hosted Sourcegraph instance, enter the Sourcegraph instance URL into the Sourcegraph browser extension options menu.
- Follow the usage steps above to enable the
sourcegraph/code-ownership
extension. - Visit any code file (on your code host) in a repository containing a
CODEOWNERS
or.github/CODEOWNERS
file. - Look in the file header to see the current file's code owner(s).
- More ways to define code owners (such as by directory-specific CODEOWNERS files, from an external code owners service, etc.)
- Per-repository configuration of how code owners are defined
- Search by code owner (e.g.,
codeowner:alice
in a Sourcegraph search query) - Directory ownership
- Filter a code review to only diffs to files you own