Skip to content

Conversation

@jelaniwoods
Copy link
Contributor

@jelaniwoods jelaniwoods commented Feb 8, 2022

Resolves #49
Resolves #45

This is a really long PR, and I don't want to squash all of these commits. @raghubetina is it alright to do a regular merge?

Become sinatra app

Use 'git' gem

Update README
Remove extra jQuery CDN

Remove hidden SHA input
to ensure that git index is up to date
Users should never see an error page if a Git action fails. web_git should fail gracefully and redirect with a flash message if something doesn't work.

This commit adds the following:
- enables session in Sinatra to display flash messages.
- refactors controller logic to rescue Git::GitExecuteError exceptions
- displays flash messages on redirect
Until it becomes feasible to draw the graph with the git gem, this commit captures the output of the graph from the command line and display it below the commit form.
The "Show last commit" window was not to be rendering the diff correctly.

This commit resolves that.
Showing the Git graph is less useful without color.

This commit adds the ansispan gem to apply CSS color and style to the captured ansi-colored git graph while preserving the clickable SHAs.
Due to changes in #105

When a project has 1 commit on the current branch git show HEAD~1 was being called which throws an error since it requires a previous commit.

Don't call git show HEAD~1 when the log has one commit.
One of the big reasons we use web_git is to avoid teaching CLI stuff. Heroku CLI is much simpler to use than git, but since they are very much connected there should also be some web interface for the Heroku commands that are common.

This commit adds nav tabs to separate Git commands and Heroku commands. It also adds the dependency on expect—which seems to be the only reliable way to auto-login to Heroku CLI. In regards to this, the installer has been updated to account for the new dependency and also handle repeat runs.
@jelaniwoods jelaniwoods merged commit a2be64e into master Feb 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research: should we make web_git a small, separate Sinatra app (or something like that)? Heroku section?

2 participants