• Stars
    star
    144
  • Rank 246,426 (Top 6 %)
  • Language
    Scala
  • License
    Apache License 2.0
  • Created over 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Looks after your pull requests, tells you when they're live

Prout

"Has your pull request been deployed yet?" - Guardian blogpost

Tells you when your pull-requests are live. Tells you when they're not, and should be.

prout overduethenseen

Prout comes from the tenet that:

Developers are responsible for checking their changes on Production

This becomes more important, and easier once you move to a Continuous Deployment release process. Important, because now a developer can break the site simply by hitting 'Merge' on a pull request - but also easier because with such a small delay (say, less than 10 minutes) between merging the work and having it ready to view in a Production setting, the developer is in a much better place to review their work; it's still fresh in their mind.

While everyone on your team may agree with this philosophy, that 10 minute lag between merge and deploy can be enough time for a developer like me to get distracted ("Look, shiny thing!" or, more realistically, "What's the next bit of work?") and forget about promptly reviewing their changes on Production.

Prout simply notifies developers in their pull request that the code has been seen in Production (a slightly stronger statement than simply saying it's been deployed).

Configuration

Follow the 4-step program:

  1. Give prout-bot write-access to your repo (so it can set labels on your pull request)
  2. Add one or more .prout.json config files to your project
  3. Add callbacks to prout - ie a GitHub webhook and ideally also a post-deploy hook
  4. Expose the commit id of your build on your deployed site

Give prout-bot write-access

Giving prout write-access by going to Settings -> Collaborators and team -> Add teams and typing in 'prout'

Admin access to the repository is required to give prout-bot write-access. Please contact your team's Engineering Manager for this.

Add config file

Add a .prout.json file to any folder you want monitored in your repo:

{
  "checkpoints": {
    "DEV": { "url": "http://dev.mysite.com/", "overdue": "10M" },
    "PROD": { "url": "http://mysite.com/", "overdue": "1H" }
  }
}

When a pull-request changes a file anywhere under that folder, Prout will scan the checkpoints defined in your config file, and update the pull-request with labels and a comment as appropriate. The url you specify in the checkpoint will be fetched, and the contents of the response will be read- so long as you embed the commit id that response, Prout will be able to work out whether or not the PR has been deployed.

Add callbacks

Add Prout-hitting callbacks to GitHub and (optionally) post-deploy hooks to your deployment systems so that Prout can immediately check your site.

GitHub

Add a GitHub webhook with these settings:

  • Payload URL : https://prout-bot.herokuapp.com/api/hooks/github
  • Content type : application/json

The hook should be set to activate on Pull Request events.

Adding a GitHub web hook by navigating to Settings -> Webhooks -> Add webhook

Note that this can be done once at the Organization Webhook level, which removes the need for doing it on each individual repo. Prout will check that any repository has a .prout.json config file present before attempting to take any action on it.

Post-deploy hooks

Whatever deployment tool you use (RiffRaff, Heroku, etc) just set it to hit Prout as a post-deploy hook (for your repo on github.com/[owner]/[repo]):

https://prout-bot.herokuapp.com/api/update/[owner]/[repo]

Hitting that url (GET or POST) will always prompt Prout to scan the repository for outstanding pull-requests.

Expose the commit id

You must embed the commit id in your site - we do this on membership.theguardian.com for instance.

I use the sbt-buildinfo plugin to store the Git commit id in my stored artifact, and then expose that value on the production site. The ugly-looking SBT config is:

buildInfoKeys := Seq[BuildInfoKey](
      name,
        "gitCommitId" -> (Option(System.getenv("BUILD_VCS_NUMBER")) getOrElse (try {
        "git rev-parse HEAD".!!.trim
      } catch {
          case e: Exception => "unknown"
      }))
    )

Slack

Users can configure a Slack hook for Prout by creating a new Slack 'Incoming Webhook':

https://your-domain.slack.com/services/new/incoming-webhook

...this will get you a 'Webhook URL', which looks something like this:

https://hooks.slack.com/services/T05FTQF9H/B012N1Y2Y/p9VyRC1ZlTqNGuu

...stick that url into a GitHub webhook for your repo as the 'Payload URL':

https://github.com/my-org/my-repo/settings/hooks/new

...and then (optionally) disable the hook in GitHub! You don't actually want to send GitHub events to the hook - this is just a place to store the private url where Prout can find it. Note that Prout needs repo-admin access in order to read the hook data!

Status

Prout has a status page per repository available at https://prout-bot.herokuapp.com/view/{organisation}/{repository}. This lists useful information like if it was able to find .prout.json, which commit it thinks is currently deployed in production, etc.

Prout also logs lots of useful information which is available in the heroku backend.

Run your own instance of Prout

Deploy

...you want to run your own instance of Prout - the instance at https://prout-bot.herokuapp.com/ is really only for the Guardian.

More Repositories

1

frontend

The Guardian DotCom.
Scala
5,740
star
2

scribe

DEPRECATED: A rich text editor framework for the web platform
JavaScript
3,521
star
3

grid

The Guardian’s image management system
Scala
1,431
star
4

toolargetool

A tool to help you debug TransactionTooLargeExceptions on Android 7+
Kotlin
932
star
5

coding-exercises

Coding exercises
402
star
6

guardian.github.com

Guardian github pages
HTML
317
star
7

riff-raff

The Guardian's deployment platform
Scala
263
star
8

gu-who

answering: who are all these users in my GitHub org?
Scala
221
star
9

dotcom-rendering

The Guardian web rendering service
TypeScript
212
star
10

typerighter

Even if you’re the right typer, couldn’t hurt to use Typerighter!
Scala
207
star
11

swarmize

the data journalism platform
Ruby
155
star
12

elk-stack

ELK Stack ... based on Elastic Stack 5.x
JavaScript
147
star
13

riemann-config

Configuration for alerting and event processing in Riemann
Clojure
141
star
14

prosemirror-typerighter

The client-side companion to Typerighter. Match ranges with spellchecker-like semantics in Prosemirror documents.
TypeScript
110
star
15

guss

Guss is a collection of Sass bower components, re-usable across multiple Guardian web products
107
star
16

source

Source: a component library for the Guardian's Design System
TypeScript
98
star
17

athena-cli

Presto-like CLI tool for AWS Athena
Python
86
star
18

recommendations

Recommendations for how to develop software at the Guardian
JavaScript
64
star
19

cf-notify

Get notified in Slack when changes to your Cloud Formation stack are made.
Python
59
star
20

iframe-messenger

postMessage interface
JavaScript
57
star
21

vagrants

Vagrant configurations
Ruby
55
star
22

ganglia-api

API layer that exposes ganglia data in a RESTful JSON manner
Python
50
star
23

amigo

AMIgo: An AMI bakery
Scala
49
star
24

prism

Tool for collecting live data about infrastructure so it can be easily queried by users and automated tooling
Scala
48
star
25

prosemirror-noting

Prosemirror plugin that adds the ability to have ranges added to the document that expand and contract around dependent on the input.
JavaScript
48
star
26

html-janitor

Scribe module - DO NOT DELETE
JavaScript
46
star
27

guss-rem

Use rem units in your CSS with a pixel fallback for older browsers
CSS
44
star
28

online-abuse-analysis

Scala
42
star
29

editions

📆🆕 Daily Edition app
TypeScript
42
star
30

kinesis-logback-appender

LOGBack Appender for writing data into a Kinesis Stream
Java
39
star
31

content-api-scala-client

A Scala client library for the Guardian's Content API
Scala
39
star
32

dev-nginx

Tools to configure a local development nginx to proxy our applications and services
Shell
39
star
33

sbt-grunt-plugin

For kicking off grunt tasks from inside sbt
Scala
38
star
34

giant

Platform for journalists to search, analyse, categorise and share unstructured data
Scala
38
star
35

teamcity-s3-plugin

Teamcity plugin for uploading artifacts to S3
Scala
36
star
36

pasteup

This project is now deprecated. Future development on the Guardian's design language can be found in dotcom-rendering
JavaScript
36
star
37

mobile-apps-article-templates

Templates for articles on The Guardian iOS and Android apps
SCSS
34
star
38

machine-images

DEPRECATED: Scripts for building machine images (principally AMIs)
Ruby
34
star
39

membership-frontend

Guardian events and masterclasses
Scala
34
star
40

status-app

Guardian AWS Applications Status App
Scala
33
star
41

play-googleauth

Simple play module for authenticating against Google
Scala
32
star
42

wraith-donk

Wraps wraith in a web server
Ruby
31
star
43

prosemirror-elements

A ProseMirror plugin for adding user-defined 'elements' containing arbitrary fields to a document.
TypeScript
29
star
44

sbt-play-assethash

SBT plugin for Play 2 to add MD5 sums to asset file names
Scala
28
star
45

consent-management-platform

Guardian consent management
CSS
26
star
46

engineering-performance-framework

The Guardian Engineering performance framework
25
star
47

facia-tool

Guardian front pages editor (AKA Fronts tool)
JavaScript
24
star
48

support-frontend

💁‍♀️❤️📰 Frontend for the Supporter platform
Scala
24
star
49

guardian-engineering-site

Code for theguardian.engineering site
TypeScript
23
star
50

mobile-n10n

n10n for nOTIFICATIOn
Scala
23
star
51

sbt-jasmine-plugin

An SBT plugin for running jasmine tests in your build.
JavaScript
23
star
52

guss-webfonts

Guss' Webfonts component
HTML
21
star
53

csnx

Monorepo for Guardian UIs
TypeScript
20
star
54

play-brotli-filter

Brotli filter for the playframework
Scala
19
star
55

react-native-with-kotlin

Placeholder description: @maxspencer created this with repo-genesis
Objective-C
19
star
56

ssm-scala

ssh replacement: CLI program that wraps SSM's EC2 Run Command
Scala
19
star
57

aws-pen-test-form

Tool to generate info for the AWS penetration testing request form
Scala
19
star
58

guss-grid-system

Sass mixins and default values for the Next Gen grid system.
CSS
18
star
59

our-engineering-culture

How we as engineers define our culture
18
star
60

sbt-teamcity-test-reporting-plugin

Sbt plugin that enables TeamCity to report test details
Scala
18
star
61

language-system

The Multi-Language Automatic Translation, Subtitling, and Voice Rendering System uses third party software to automatically convert audio to text, translate text, render text to video, and render text to audio.
PHP
17
star
62

music-api-scala-client

Scala
17
star
63

lambda-elasticsearch

Helper to send elasticsearch request from a lambda
JavaScript
16
star
64

awesome-lambda

A collection of Lambda related implementations, libraries, resources an useful stuff.
15
star
65

cdk

Generic Guardian flavoured AWS CDK components
TypeScript
15
star
66

subscriptions-frontend

Scala
15
star
67

world-map

Rough-and-ready geometry files for quickly rendering an SVG map of the world
15
star
68

techtime

General repository for everything techtime.
Ruby
14
star
69

prosemirror-invisibles

A simple implementation of invisible characters in ProseMirror.
TypeScript
14
star
70

httpie-hmac-auth

HMAC auth plugin for HTTPie
Python
13
star
71

videojs-embed

A plugin for Video.js that adds a control bar button to toggle an embed code overlay.
JavaScript
13
star
72

tagmanager

Tag Manager: "Like a Beautiful Mind, but with tags" - Unknown
JavaScript
13
star
73

coding-exercise-project

Skeletion project structures for various languages
Shell
13
star
74

security-hq

Centralised security information for AWS accounts
Scala
13
star
75

manage-frontend

TypeScript
12
star
76

ts-failure

Promise error handling in typescript.
TypeScript
12
star
77

grunt-asset-monitor

Grunt task to analyse and log simple metrics of static assets to Amazon CloudWatch.
JavaScript
12
star
78

simple-configuration

A configuration library without any magic
Scala
12
star
79

element-radiator

Helper Polymer elements for building information radiators and monitoring dashboards
HTML
12
star
80

elk6

Elasticsearch, Logstash, Kibana stack for version 6
Ruby
11
star
81

play-secret-rotation

Rotate your Application Secret on an active cluster of Play app servers
Scala
11
star
82

janus-app

Google-backed AWS account access
Scala
11
star
83

zapush

drop-in war to submit jmx stats to zabbix
Scala
11
star
84

libs

A collection of JavaScript libraries and TypeScript types for Guardian projects
TypeScript
11
star
85

scribe-angular-example

JavaScript
11
star
86

quiz-builder

NO LONGER USED - Tool for building quiz JSON
JavaScript
11
star
87

fastly-api-client

An asynchronous Scala client for Fastly's API used to deploy and update configs, decache objects and query the stats API
Scala
11
star
88

tip

Scala library for testing in production
Scala
10
star
89

grid-inspector

Web UI to inspect rights of Grid images
JavaScript
10
star
90

support-service-lambdas

Lambdas covering supporter operations, mostly in life operations
Scala
10
star
91

solr-field-update

Basic support for merging documents in Solr.
Java
10
star
92

pan-domain-authentication

Helper to provide a common federated authentication for all services within a domain (AKA Panda)
Scala
10
star
93

fezziwig

Fezziwig is a library for compile time generation of Circe encoders/decoders for Scrooge-generated classes representing Thrift objects.
Scala
10
star
94

flags

Collection of SVG flags indexed by world bank code (e.g. GBR.svg = Union Jack), plus scripts to get bitmap thumbnails
JavaScript
10
star
95

raspberry-pi-dashboards

How to setup Raspberry Pi dashboards in the Guardian Digital department
Shell
10
star
96

scribe-plugin-noting

JavaScript
9
star
97

content-api-haskell-client

A simple Haskell client library for the Guardian's Content API
Haskell
9
star
98

dupin

Search Git repositories for secrets
Python
9
star
99

guss-layout

Low-level responsive layout patterns
CSS
9
star
100

csrf-example

Practice exploiting Cross-Site Request Forgery vulnerabilities
JavaScript
9
star