Skip to content

Instantly share code, notes, and snippets.

View cornelius's full-sized avatar

Cornelius Schumacher cornelius

View GitHub Profile

Setting commit email for web based GitHub operations per organization

GitHub provides a number of wonderful features in the web UI which can be used to create commits. You can do things such as directly edit files, or squash and merge pull requests, or apply suggested changes from code reviews. This is great and makes things easy.

But if you want to use different emails in the git commits when you are contributing to different repositories, you can't. For example if you are part of an organization for work, and you also maintain an open source project as a side project, you can't do things like merging pull requests in the web UI with your personal address for the open source project and with your work address for the organization you work for.

The problem

There

From 019c14da1e0c32a4a5a0c094f47af4e1dce9286a Mon Sep 17 00:00:00 2001
From: Cornelius Schumacher <schumacher@kde.org>
Date: Mon, 23 Jan 2017 23:16:21 +0100
Subject: [RFC] Proof of concept: Support multiple authors
This patch is a proof of concept implementation of support for
multiple authors. It adds an optional `authors` header to commits
which is set when there are authors configured in the git config.
A new command `git-authors` is used to manage the authors settings.
---
name: git-server
releases:
- name: git-server
version: latest
instance_groups:
- name: git-server
azs: [z1]
@cornelius
cornelius / fix-topics.rb
Created February 24, 2017 22:45
Script to fix missing topics in inqlude-data
#!/usr/bin/ruby
require "json"
Dir.glob("*").each do |dir|
generic_manifest = "#{dir}/#{dir}.manifest"
if File.exist?(generic_manifest)
topics = JSON.parse(File.read(generic_manifest))["topics"]
if topics
puts "#{dir}: #{topics}"
  • djjd
  • djdjd
output += Renderer.for(scope).render_comparison(comparison,
options
)
def render_comparison(comparison, options = {})
@options = options
@buffer = ""
@indent = 0
@stack = []

Keybase proof

I hereby claim:

  • I am cornelius on github.
  • I am cornelius (https://keybase.io/cornelius) on keybase.
  • I have a public key whose fingerprint is EA81 9481 7267 164C 61FB AF26 6AEF F492 2B18 5BBB

To claim this, I am signing this object: