Coder Social home page Coder Social logo

jwu910 / check-it-out Goto Github PK

View Code? Open in Web Editor NEW
154.0 5.0 70.0 8.92 MB

A command line interface for Git Checkout. See branches available for checkout.

Home Page: https://jwu910.github.io/check-it-out/

License: MIT License

JavaScript 0.91% TypeScript 99.09%
git checkout cli check-out github-cli git-cli cli-tool git-branch developer-tools devtool

check-it-out's Issues

Bug: If current working directory is not a git repository, app breaks

The app hangs in a blank state if the cwd is not a git repository.
Can simply check if the currentBranch() method returns a valid response or not.

Program should throw an error and print the correct error message for the user

git rev-parse --is-inside-work-tree will return true if path is inside a git repo. otherwise it will go to stderr

First time checkout

If branch is not on local, but exists on origin, git checkout should be called without the remote param.

e.g.: git checkout test-branch instead of git checkout origin/test-branch

Build a keyMap utility

Add left and right functionality to change remote. Add getUniqueRemotes method here.


check-it-out/index.js

Lines 39 to 44 in dedef3a

screen.render();
};
/**
* @todo: Build a keyMap utility
* @body: Add left and right functionality to change remote. Add getUniqueRemotes method here.


This issue was generated by todo based on a @todo comment in dedef3a when #79 was merged. cc @jwu910.

"Remote" heading doesn't handle branches that are grouped

Branches that are grouped inside of a remote get mis-labeled as having their group be the remote
e.g

remote: origin
branch: hotfix/fix-print-out

since hotfix is a grouping, it would show up as origin/hotfix/fix-print-out; therefore all "hotfix" branches get marked as having hotfix for a remote
image

I'm guessing these lines (or close to it) are the culprits

check-it-out/index.js

Lines 53 to 55 in 0b3a1b1

const branchInfo = val.content.split(/\s*\s/).map(column => {
return column === 'local' ? '' : column;
});

Fix Typos

Need to fix typos in the readme and contributing guidelines.

Improper use of .then()

Using await someAsyncFunction().then(//do something)

Should we be using try catch here and then continuing?

Feature: Implement Tabs

Branches should be grouped by remotes and sorted into tabs.

h/l, left/right should switch between tabs

l currently selects, and should be unset first.

Tabs should be listed above headers and highlight current remote.

Clean up index.js code

Code is messy and hard to read. Need to componentize code


check-it-out/index.js

Lines 22 to 27 in 28797e4

* @todo Clean up index.js code
* @body Code is messy and hard to read. Need to componentize code
*/
if (!process.argv.slice(2).length) {
const screen = dialogue.screen();


This issue was generated by todo based on a @todo comment in 28797e4 when #74 was merged. cc @jwu910.

Request: Compatibility with Node 6

Node 7 is currently required due to the use of async await functions.

Looking to add Node 6 and compatibility and maybe older versions in the future as well.

If this project is required to build before deployment, we may have to move that route which would require some reorganization.

Remove "Path" column

Path column could provide different data. Seems unnecessary to list ref path now...

Maybe list last commit?

Implement testing suite

Need find and implement a testing suite to test utility functions.

I have used Jest for web app projects, but not for CLI tools.

Bug: Promise error when creating a new local branch

When checking out a branch that exists on a remote, but not user's local, the following error occurs:

image

[LOG] fatal: Unable to create '/home/joshua/programming/check-it-out/.git/index.lock': File exists.

Suspecting that Git is trying to execute another command before the first command has completed. This would most likely be an incorrect use of Promises with the async and await keywords in the Git utilities.

Migrate components

Move objects into components:
Screen
Table
Questions
Status bar
etc.?

Infrastructure: Reorganize blessed objects

Need to compartmentalize blessed screen and window objects.

Currently, code is confusing to read. Entry point should be very minimal, only instantiating the main screen.

Windows Compatibility

Currently does not work with windows.

Some research has explained that this needs to be a portable node app. Reasons the node app probably does not work is the difference in file system paths and how '/' does not resolve on windows systems.

Use path.resolve() as a start.

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.