GithubHelp home page GithubHelp logo

barsoom / ex-remit Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 5.0 1.74 MB

A self-hosted web app for commit-by-commit code review, written using Phoenix LiveView.

License: MIT License

Elixir 88.05% CSS 1.57% JavaScript 3.41% HTML 6.91% Procfile 0.03% Euphoria 0.03%

ex-remit's People

Contributors

calleluks avatar dependabot[bot] avatar henrik avatar martybegood avatar oddnugget avatar olleolleolle avatar p-wall avatar soma avatar tskogberg avatar tsrandrei avatar ulfurinn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ex-remit's Issues

Rethink sha uniqueness

There is a unique index on commits.sha, but it should probably be on [repo, sha].

We'll also need to change the association from comments to commits, since that's only on the sha currently. Maybe make that one just use the primary key, now that we ensure a commit always exists if the comment does.

Stats: Only count the same commits as shown in the UI

The UI first gets the latest n commits, then counts stats in memory.

The stats API counts unreviewed commits from all listed commits, so their counts won't match.

The stats API should also get the latest n and count stats in memory.

Todos et lagrimas

More important:

  • Either start using username instead of email for avatars and "reviewed by", or at least start saving the username so we later could do this
  • Decide whether we want usecs in datetimes or not
  • Save full payload to make future migrations easier?
  • Error reporting (Honeybadger)
  • Highlighted comments
  • Polish comments view

Fun polish:

  • Tooltips
  • Include reactions on comments in feed, not just comments proper. Best approach might be: on a recurring schedule, figure out which repos the most recent commits are from. Call https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository for each repo to get reactions.
  • Relative times here and there, or contextually long times – just the time if today, just the weekday if in the past week…
  • Show emoji-only comments in a bigger font (We should probably then also parse GitHub emoji syntax. Could do a sloppy but simple detection of real emoji by triggering on any texts shorter than x length and containing no letters or digits. Perhaps showing all short messages in larger font, even.)
  • Show an indicator when you've been reviewing for a long time
  • GitHub Oauth for auth + setting username

Can wait until after we start using it:

Public release:

  • Screenshot in README
  • Logo in README
  • Polish README

Ignore web-flow user?

Remit shows such a user for e.g. the commit b5889b7.

  • Don't show it as a co-author (maybe? But we probably still want to show dependabot as one?)
  • Don't notify it about comments (and do the same for all bots?)
  • Remove any notifications to it already in the DB (ditto)

Indicate when you've left a commit "in review" for too long

Like the old Review app did.

A simple solution without writing JS could be to have a timer running e.g. every minute in the LiveView, setting a virtual column to "overdue" or something for overdue commits, then unsetting it when abandoning the review or marking it as reviewed.

Handle comments on commits that aren't in DB

  • Exclude hidden commits from stats
  • Actually fetch commits
  • Notify commit users
  • Actually fetch previous comments on commit
  • Notify comment users

We can't notify the commit author if we don't have the commit in DB.

Plan:

  • When a comment comes in via webhook and we don't have the commit in DB, fetch it via API and create it in DB.
  • Also fetch all previous comments on the commit (or on this thread, specifically), only creating them if they don't exist already.
  • Flag the commit and comments with something like hide: true
  • Don't show hide == true commits and comments in the UI. Only use them for notifications. Sticking them at the top of the commit list would be annoying (they could be old); sticking them further down gets confusing.

Alternatively:

  • We could just use the data we got via API to notify, and not store anything. This means fetching from API every time if there's an extended discussion, but also means no storing hidden data in DB.
  • We could show them in some separate legacy list with unknown usernames. Perhaps easier but less useful.

Revisit `@foo Application.get_env(…)` pattern

Gets env at compile-time, so maybe not a good choice in some cases, e.g. for API keys. If we e.g. change the Heroku API key, I believe it wouldn't actually change until the next deploy.

Can get stuck on "Internal server error" until manually reloaded

Happened to at least me and Olle overnight. We also had some DB timeout errors logged. My guess is Heroku did something that caused these errors. The clients got this error page at some point from the DB timing out, and nothing on the page attempts to recover from that.

So we could for example look into customising the error page

Screenshot 2020-06-30 at 08 34 59

to have some JS to attempt reloads, maybe.

Also look in the old Review repo – I seem to remember seeing some additional error or retry handling in that one that may or may address a similar situation.

Remove stuff from old Review

  • Dataclip
  • Git hooks
  • Git hooks being set up in devbox
  • Remove from dashboard – ideally by getting rid of it in CI/Pipeline (?) rather than by ignoring it in dashboard_frontend
  • Heroku
  • Heroku: review-on-review
  • DB (take backup?)
  • Heroku "auctionet-remit" (Stimulus Reflex lab?)

Handle webhooked commits without username or plus addressing

Such as https://github.com/barsoom/live_bidding/commit/c74404360d1397bc5cc4b88dc7be7f4579ab1637 which had

      "author": {
        "name": "…",
        "email": "…"
      },
      "committer": {
        "name": "…",
        "email": "…"
      },

with no username passed, and no plus addressing in the emails.

Have asked the dev in question if they know the circumstances: https://auctionet.slack.com/archives/CF9SAN79V/p1591976514145100?thread_ts=1591945393.083400&cid=CF9SAN79V

Looked in DB: we stored authors: [] on the commit.

Simplest solution might be to just make it an explicit, documented requirement that at least one committer/author needs to have a GitHub username, or commit with plus addressing.

We could show "[warning triangle] Unknown username" maybe, with a tooltip like "Committed by Foo Barson with no GitHub username, blabla, Remit won't be able to blabla…".

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.