Giter VIP home page Giter VIP logo

ogit's People

Contributors

padawin avatar wmalik avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

ogit's Issues

Allow users to clone repositories in bulk

A user should be allowed to clone repositories in bulk using a subcommand clone that expects an organization name and a filter.

Clone a subset of repositories in an org

ogit clone --org tpope --filter vim

Clone all repositories in an org

ogit clone --org tpope

Improve config structure in .gitconfig

The current config has the following issues:

  • the name orgs is not consistent with gitlabGroups
  • clonedirpath does not use camelcase
  • consolidate useSSHAgent and privKeyPath into one attribute
  • Add sections for repo providers (i.e. github, gitlab) for provider specific config
[ogit]
  orgs = padawin, tpope, charmbracelet, wmalik
  gitlabGroups = fdroid
  clonedirpath = /absolute/path/on/disk
  fetchAuthenticatedUserRepos = true
  useSSHAgent = true
  privKeyPath =

Make the repository clone operation atomic

Currently, if the cloning process is interrupted by the user (or network hiccups), the repository shows up as cloned in the TUI. This can be fixed by cloning the repo to a temporary directory and then renaming that directory to the repository storage path.

Fetch repositories incrementally

Fetch the list from upstream at startup one page at a time but update the UI incrementally as pages are being downloaded)

Alternatively, or additionally, we could:

  • load the first page,
  • display it
  • load the rest in the background,

So that we get the content for searching, but the UI gets populated faster.

Originally posted by @padawin in #6 (comment)

Cancel current action

Let's say we started accidentally to clone a big repo, it would be good to be able to cancel the operation. But this should be global (cancel any operation).

Use sqlite for repository metadata storage

Problem 1

The tool is not usable without internet access.

  • I would find it useful to browse at lest my cloned repositories, and cd
    into a project even when I don't have internet access. Additionally, I would
    find it useful to browse repositories (name, description, and README)
    without internet access. The repositories of the organization are not
    frequently changing, especially the names, descriptions, README. The code
    changes quite often, but I believe that it is worthwhile to have access to
    stale code (as compared to no code). Repository metadata and code is highly
    cache-able because it doesn't change often.

Problem 2

A high number of repositories slows down the user on each invocation of the
tool.

  • Currently, the tool fetches the entire list of repositories on startup.
    This can a delay of a few seconds for a high number of configured repos (we
    should allow users to add as many organizations as possible according to
    the API rate limits). Since the repository metadata seldomly changes, it is
    inefficient to fetch this whole list every time and make the user wait for
    it. I see myself using this tool multiple times a day, and would find this
    behavior a bit inconvenient. This issue is due to the fact that the entire
    state of the application is kept in memory and needs to be rebuilt on each
    invocation.

Proposal

I have the following proposal to address the above problems (and the parent issue):

  • Store the application state (i.e. the metadata of the organizations/repos) on
  • disk using SQLite (or similar)
  • Decouple the UI from over-the-network API calls, and render the UI using the
  • SQLite DB state only. The DB state consists of only the metadata (not the
    repository contents)

Originally posted by @wmalik in #7 (comment)

Change ogit command to use cache by default

ogit fetch should fetch all repository metadata and exit
ogit should behave like ogit --cached
ogit should prompt the use to run ogit fetch if the cache is empty
Remove ogit --cached

Example invocation:

ogit fetch && ogit

Repository browser

Repository browser tab

Org Repos Language โญ ๎œฆ Last Updated Desc
orgname1 ๐ŸŒ tf-service HCL 25 10 3 hours ago repo desc here......
orgname1 ๐ŸŒ go-service Go 25 10 7 hours ago repo desc here......
orgname1 ๐Ÿ”’py-service Python 25 10 8 hours ago repo desc here......
orgname1 ๐ŸŒ yaml-service YAML 25 10 9 hours ago repo desc here......
orgname2 ๐ŸŒ sql-service SQL 25 10 9 hours ago repo desc here......
orgname2 ๐ŸŒ c-service C 25 10 9 hours ago repo desc here......

Possible features

  • When a repo selected, the repo description is expanded and show in the right pane
  • When a repo is selected, the repo README is rendered using glow and shown in the right pane
  • When a repo is selected, pressing "c" clones the repo locally
  • When a repo is selected, pressing "Enter" brings up a context menu with actions such as (clone, open in browser, open pulls, open issues etc.)
  • Pressing "s" brings up a menu to sort by stars|, forks, lanugage etc.
  • Pressing "Ctrl-f" or "/" brings up a text field to fuzzy search repos (by name, language, description, full text search in README, full text search in repo etc)

GitHub and GitLab repos are not namespaced

  • The github and gitlab repositories are cloned in the same namespace on disk
  • The repositories table curretly does not have the provider name (github, gitlab) for a repository and hence it is not possible to filter them by provider

Context based ogit subcommands

Implement ogit subcommands that open the relevant web page when invoked from a directory managed by ogit.

Subcommands for quickly jumping to relevant URLs

  • ogit pulls
  • ogit web
  • ogit issues
  • ogit actions
  • ogit releases
  • ogit settings
  • ogit org

People browser

People browser tab

  • Show the list of people in an organization
  • For each member, show the username, name and following attributes if available:
    • membserhip status (owner, member)
    • 2FA status

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.