Skip to content

Instantly share code, notes, and snippets.

@aereal
Last active December 9, 2019 10:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aereal/70230b88bb373f7df95b8361296a4012 to your computer and use it in GitHub Desktop.
Save aereal/70230b88bb373f7df95b8361296a4012 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
repo = ENV['REPO']
puts ARGF.read.strip.gsub(/(\s+|\A)#(\d+)\b/m) {|m| "#{$1}#{repo}##{$2}" }
@aereal
Copy link
Author

aereal commented Dec 9, 2019

usage:

git filter-branch -f --msg-filter 'env OWNER=... REPO=... path/to/update-issue-refs.rb' --

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment