Skip to content

CiciDongxue/octotree

 
 

Repository files navigation

About

Browser extension that brings GitHub experience to the next level. This repository contains the source code of Octotree Core. You can build and run it locally to access all features of the free version. Or you can download the full version on our website. Octotree supports Chrome, Firefox, Opera and Safari.

Octotree

Features and Settings

Access Token

Octotree uses the GitHub API to retrieve repository metadata. By default, it makes unauthenticated requests to get these data. However, there are two situations when GitHub require such requests to be authenticated:

When that happens, Octotree will ask for your GitHub personal access token. If you don't already have one, create one, then copy and paste it into the token textbox in the Settings screen. Note that the minimal scopes that should be granted are public_repo and repo (if you need access to private repositories).

No BS Policy: Octotree doesn't collect/share/care about your data at all. It stores the access token in your browser local storage and uses it only to communicate with GitHub API (see the code that does that here).

Access tokens are stored in the browser's local storage, only enter access tokens when you use a trusted computer.

Multiple Access Tokens (Pro)

If you have multiple GitHub accounts with access to different private repositories, you can let Octotree know which access token to use for which account. When you login to GitHub with an account, Octotree will use the matching token to make API requests to GitHub. If you don't login to GitHub or if the account you login is not in the account list, Octotree will use the default access token.

Go to Settings and click the + icon to add more accounts. Similar to access token, these accounts and tokens are stored in the browser's local storage.

Multiple GitHub accounts

Hotkeys

Hotkeys to pin or unpin the sidebar. You can enter multiple hotkeys by separating them with a comma.

  • Supported modifiers: , shift, option, , alt, ctrl, control, command, and .
  • Supported special keys: backspace, tab, clear, enter, return, esc, escape, space, up, down, left, right, home, end, pageup, pagedown, del, delete and f1 through f19.

Learn more at keymaster.

GitHub Enterprise (Pro)

Note: GitHub Enterprise is not supported on Safari.

Follow these steps to enable Octotree for GitHub Enterprise:

  • Navigate to any repository on github.com (not GitHub Enterprise)
  • Open the Octotree sidebar
  • Click the login link in the footer (or in Settings view)
  • Login using your Octotree account
  • Navigate to your GitHub Enterprise domain
  • Right-click the Octotree icon the browser bar (see image below) select "Enable Octotree on this domain"

GitHub Enterprise

Others

  • Show sidebar on hover. If checked, hover the Octotree button to open the sidebar. Otherwise, click the button to open the sidebar.
  • Load entire tree at once. If checked, load and render the entire repository file structure at once. Otherwise, Octotree loads when a specific directory is clicked. For large repos where Octotree can't load in a single request, Octotree ignores this settings and lazily-loads the repo.
  • Show file-specific icons. If checked, show different icons for different file types.
  • Show only pull request changes. If checked, show only the change set of the current pull request. Otherwise, show the full code tree.
  • Enhanced code review (Pro). In the Pull Request page, you will automatically see file comments and file view status.
  • Multiple themes (Pro). Click the theme icon located at the bottom of Octotree to select a color theme. The "Only Sidebar" theme changes the Octotree sidebar to the dark theme without changing the theme of the GitHub page.
  • File search (Pro). Click the search icon to start file search. Note that this requires the "Load entire tree at once" option to be selected.
  • Change docking position (Pro). Click the dock icon at the footer of Octotree to change the sidebar location to the right or left of the screen.
  • Repository and PR bookmark (Pro). When viewing a repository or pull request, you can click the bookmark icon next to its title to bookmark it. You can view all bookmarks by clicking the bookmark icon in Octotree header.
  • Octotree visibility (Pro). Control which pages Octotree will show up in by choosing among the provided options.
  • Repository caching (Pro). Whether to cache the repository file structure in local machine cache (via browser Cache API). This speeds up loading of large repositories and reduces the number of API requests to GitHub.

Browser Permissions

Octotree Core (built from source from this repo) requires some browser permissions:

  • Read/change data in github.com and api.github.com: needed to show Octotree and make requests to GitHub API
  • storage: needed to store Octotree settings

The full version of Octotree requires these additional permissions:

  • Read/change data in octotree.io: needed to authenticate users and load/store bookmarks from Octotree API
  • contextMenus: needed to show Octotree context menu items
  • activeTab: needed for context menu actions to trigger enabling/disabling Octotree in GitHub Enterprise domains

The following permissions are optional and only requested when you enable Octotree in a GitHub Enterprise domain (*):

  • webNavigation: needed to inject Octotree sidebar in GitHub Enterprise domains
  • tabs: needed to inject Octotree sidebar in GitHub Enterprise domains

*: when enabling Octotree in a GitHub Enterprise domain, Chrome displays the prompt for the "Read your browsing history" permission. That's a bit confusing as Octotree doesn't request the history permission or collect your data at all. See this discussion for more details. Firefox, on the other hand, is clearer about the specific permissions being requested by Octotree.

Credits

Octotree uses the following open-source software:

Packages

No packages published

Languages

  • JavaScript 71.9%
  • CSS 26.6%
  • HTML 1.5%