Skip to content

Instantly share code, notes, and snippets.

View tvervest's full-sized avatar

Thomas Vervest tvervest

View GitHub Profile
@tvervest
tvervest / changelog.sh
Created December 5, 2017 09:55
A one-liner to extract JIRA ticket numbers for a specific release tag. Based on the script from step 5 from 6 steps to better release management in Jira Software (https://www.atlassian.com/blog/jira-software/jira-release-management-steps), with the addition of a requirements for tickets to be merged from the feature branch.
git log <tag> --pretty=oneline | perl -ne '{ /feature\/(\w+)-(\d+)/ && print "$1-$2\n" }' | sort | uniq
@tvervest
tvervest / prepare-commit-msg
Created May 23, 2014 15:20
A git hook which appends a reference to a Pivotal Tracker story ID, if a branch starts with a number (e.g. "<story id>-my-issue")
#!/bin/sh
# Get the story ID from the branch name
story_id=`git symbolic-ref --short -q HEAD | grep -o "^[[:digit:]]*"`
if [ ! -z "$story_id" -a "$story_id" != " " ]
then
# If a story ID is found, prepend the commit message with a reference
echo "[#$story_id] $(cat $1)" > "$1"
fi
@tvervest
tvervest / ExtendedBarButtonItem.h
Created January 30, 2014 13:38
A drop-in replacement for the UIBarButtonItem class which passes the set target and action to the custom view if it is a UIControl. As I grew tired of having to pay attention to UIBarButtonItem objects having custom (control) views, I wrote an extending class which actually behaves the way (I think) the parent class should. All you have to do is…
//
// ExtendedBarButtonItem.h
//
// Created by Thomas Vervest.
// This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
// http://creativecommons.org/licenses/by-sa/4.0/
//
#import <UIKit/UIKit.h>