Skip to content

Instantly share code, notes, and snippets.

@blanchardjeremy
blanchardjeremy / README.md
Last active January 16, 2022 10:16
Workflow: Using a GitHub application to edit files, and auto-merge them

Workflow: Using a GitHub application to edit files, and auto-merge them

This gist offers a pattern to create a GitHub application (aka: bot) that serves as a bot to edit files and succesfully merge them into your repo, using GitHub actions & workflow files.

The end result is that you can have workflows that look like this:

image

Instead of this:

@blanchardjeremy
blanchardjeremy / README.md
Created February 23, 2012 00:18
Django class-based generic views for flatpages

How to use this

This snippet requires that you define each flatpage manually in a urls.py somewhere in your app. This is not ideal for most uses of flatpages. This class based view could probably be abstracted to handle the use case based on the flatpages middleware catching the 404 and seeing if any flatpage matches it.