basyura's activity - 2021/01/01
— ばしゅら (@basyura) 2021年1月1日
Commit : 1 pic.twitter.com/lCepAw4LOo
あまりツイートすることも無くなってきたので記録がてら GitHub にコミットがあったら垂れ流すようにするスクリプトを動かしているのだけど、非推奨になってる API を使っているから直せとメールが来ていた。ずっと無視していたけど年末年始の休みという自由時間ができたので直した。
https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/
As mentioned in this previous blog post, GitHub no longer supports authentication through query parameters. Instead, we recommend users move the authentication in the header.
クエリパラメータで指定していたのをヘッダで指定するように変えるだけ。
# before curl "https://api.github.com/user/repos?access_token=my_access_token" # after curl -H 'Authorization: token my_access_token' https://api.github.com/user/repos
スクリプト修正中に、指定するパスにある user
を消していたために謎の not found で 1 時間ぐらい悩んだけど直せた。めでたしめでたし。