Skip to content

bdelanghe/present-me

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

present-me

A tool to view/show a PR as a presentation / slide-show.

See https://prme.stanistan.com for a demo.

image

Why

Sometimes you make a PR that is too large for folks to read/parse top-to-bottom and it would be useful to annotate it to desribe and show your team how to read and parse the changeset. What's important, what's superfluous, what's incidental to this change?

Present-me uses GitHub's Review Comments as a persistence layer (and write UI) to generate something that can be, well, presented!

How to use it

  1. Create your PR as you would normally... pr
  2. Start commenting on your own PR! But instead of individual comments, start a review!
  3. Prefix your comments with a number to set the order that it'll show up
  4. Grab the permalink of the review. image
  5. Go to https://prme.stanistan.com/
  6. Paste the permalink into the box
  7. Hit GO! rendered
image

Development

This project uses hermit for dependency management.

Bootstrap

prmectl bootstrap

Make sure you've run this before anything else!

server/.env

This assumes you have a .env in the server directory.

PORT=8080
GH_APP_ID=0
GH_INSTALLATION_ID=0
LOG_OUTPUT=console
DISK_CACHE_ENABLED=true
DISK_CACHE_BASE_PATH=../data
DISK_CACHE_MAX_SIZE=10000

N.B. Not having the ID, InstallationID, and PK file will use the public GH API and be subject to those rate limits. Enabling the DISK_CACHE helps alleviate those. You can check out the cached files in data/ to see what the responses look like.

Full options:

go run ./cmd/server --help
Usage: server --serve="static" --log-output="json" --gh-app_id=INT-64 --gh-installation_id=INT-64

Flags:
  -h, --help                                     Show context-sensitive help.
      --port="8080"                              ($PORT)
      --hostname="localhost"                     ($HOSTNAME)
      --server-read-timeout=5s
      --server-write-timeout=10s
      --serve="static"
      --static-dir="./static"
      --proxy-address="http://localhost:3000"
      --log-output="json"                        ($LOG_OUTPUT)
      --disk-cache-enabled                       ($DISK_CACHE_ENABLED)
      --disk-cache-base-path=STRING              ($DISK_CACHE_BASE_PATH)
      --disk-cache-cache-max-size=1024           ($DISK_CACHE_MAX_SIZE_KB)
      --gh-app_id=INT-64                         ($GH_APP_ID)
      --gh-installation_id=INT-64                ($GH_INSTALLATION_ID)
      --gh-pk-file=STRING                        ($GH_PK_FILE)

Development

prmectl dev

This will start both the go server at port 8080 and the nuxt client at port 3000.

You can interact with both via port 8080 since the go server will proxy directly to nuxt.

Testing a production binary

prmectl local-prod

This will generate the static output from nuxt and run the server in production mode (not a proxy to the nuxt dev-server).

About

Pull Request as a document / blog post / presentation tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 53.7%
  • Vue 36.1%
  • Shell 4.6%
  • TypeScript 1.9%
  • JavaScript 1.3%
  • SCSS 1.2%
  • Dockerfile 1.2%