長めの切れ端

チラシの裏 (open)

GitHub Coupon 期限切れ

GitHub Education 経由で二年間分の coupon を頂いていたけれど, それがつい先日期限切れになった.

期限の二週間前にこんな感じのメールが届く :

Hey there,

Thanks for using GitHub! A while ago you used a GitHub coupon that was good for $7.00 off 2 years of GitHub. This coupon will expire in 14 days (October xx, 2017).

If you are still a student or teacher, you may apply for a new academic discount coupon at https://education.github.com/discount_requests/new

We noticed you haven’t entered any payment information yet. If you’d like to continue using the plan you’re on (Developer – $7/month) you’ll need to add a valid payment method to your account. After your coupon expires, we’ll charge your account and you can keep using your plan without interruption.

https://github.com/account/billing – enter a payment method

If you don’t want to continue your current plan you can delete your private repositories and downgrade to a free plan.

We hope you’ve enjoyed trying out GitHub’s private features. Please let us know if you have any questions — reply to this email or contact support@github.com.

Thanks for being awesome, The GitHub Team

あるいは, ログイン画面にもこんな感じの注意がデカデカと表示された:
f:id:mmd6450:20171015115956p:plain

最近は Private Repository も使用していなかったので, 有料プランに移行せずに, ここで解除することとした.

Repository のバックアップ自体は $ git clone で引っこ抜いたものを zip にして他所に保管する (あるいは BitBucket の Private Repository に push し直す) だけで良いけれど, 問題は GitHub 独自のサービス, 具体的には Issue/Pull request が全部消えてしまうこと. でもまあ課金しない以上はしょうがない.
対象の全 HTML ページを保存するのもなんか嫌だったので, 今回は GitHub APIOctokit.rb 経由で叩いて JSON を引っこ抜いて保存した. Octokit まわりで参考にさせて頂いたのは, 公式ドキュメントの他には きたけーさんの記事城陽人さんの記事 .
幸か不幸か Issue と Pull Request は一纏めで issue API の対象となる (全取得かけるとどっちも引っ張ってくる). 元々 GitHub ではそれぞれの #xx の番号通しだしそんなもんでしょう.

実際に警告が飛んでくる / 削除されるまで Private Repository を残しておくとどうなるのはかわかりません. もしかすると Read 専用でアクセスできたり若干の猶予が頂けたりするのかもしれませんが, なんかそれはやり方が汚いような... ?

あまり意識しなかったけれど, 私は "学生時代に無料を盾に使わせておいて, 就職後にそれを布教させる" という, 恐らくはこのプランの狙い通りに動いている気がする. ありがとう GitHub.