Created
January 25, 2016 10:05
-
-
Save perlpunk/cee0fb225b974a1a9052 to your computer and use it in GitHub Desktop.
git-hub-event-bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
command:event-user() { | |
get-args owner:get-user | |
title="Events for '$owner':" | |
report-list \ | |
"/users/$owner/events" \ | |
"id created_at type repo/name payload/ref_type payload/ref payload/master_branch created_at payload/action" | |
} | |
format-entry:event-user () { | |
if "$raw_output"; then | |
out "$2" | |
else | |
local date="${3/T/ }" | |
date="${date/Z}" | |
local prefix | |
printf -v prefix "%2d) %s %s" "$1" "$2" "$date" | |
case $4 in | |
*) | |
printf -v output_line "$prefix %-14s %-12s %s %s %s %s %s %s" \ | |
"$4" "${5/Event}" "$6" "$7" "$8" "$9" "${10}" | |
;; | |
esac | |
fi | |
} | |
# vim: set lisp: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment