Skip to content

https-ethereum-org/sourcegraph-code-ownership

 
 

Repository files navigation

Code ownership extension for Sourcegraph

Build Status

A Sourcegraph extension that shows code owners of the current file.

🗃️ Source code

➕ Add to Sourcegraph (see usage instructions for self-hosted Sourcegraph instances)

Features

Works on Sourcegraph.com, self-hosted Sourcegraph instances, and on code hosts (via the Sourcegraph browser extension).

  • Code owner of current file displayed in the file header

Only CODEOWNERS and .github/CODEOWNERS files are supported right now. File an issue if you want need support for another code ownership scheme.

Screenshot

Usage

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).

  1. Enable the sourcegraph/code-ownership extension:
  2. Visit any code file in a repository containing a CODEOWNERS or .github/CODEOWNERS file.
  3. Look in the file header to see the current file's code owner(s).

On your code host

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:

  1. 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.
  2. Follow the usage steps above to enable the sourcegraph/code-ownership extension.
  3. Visit any code file (on your code host) in a repository containing a CODEOWNERS or .github/CODEOWNERS file.
  4. Look in the file header to see the current file's code owner(s).

Screenshot on GitHub

Roadmap

  • 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

About

A Sourcegraph extension that shows code owners of the current file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.4%
  • JavaScript 0.6%