Githubからやってくるhookの内容メモ
Githubのhook
https://help.github.com/articles/post-receive-hooks
タグが作成され、pushされたときは
{ "ref": "refs/tags/testtag", "after": "a011d5d157f769b39b99d2c10333e936eeab6bed", "before": "0000000000000000000000000000000000000000", "created": true, "deleted": false, "forced": true, "base_ref": "refs/heads/master", "compare": "https://github.com/mashijp/gitstudy/compare/testtag", "commits": [ ], "head_commit": { "id": "a011d5d157f769b39b99d2c10333e936eeab6bed", "distinct": true, "message": "delete", "timestamp": "2013-04-25T09:10:23-07:00", "url": "https://github.com/mashijp/gitstudy/commit/a011d5d157f769b39b99d2c10333e936eeab6bed", "author": { "name": "mashijp", "email": "(ry", "username": "mashijp" }, "committer": { "name": "mashijp", "email": "(ry", "username": "mashijp" }, "added": [ ], "removed": [ "fugahoge" ], "modified": [ ] }, "repository": { "id": 9674385, "name": "gitstudy", "url": "https://github.com/mashijp/gitstudy", "description": "", "watchers": 0, "stargazers": 0, "forks": 0, "fork": false, "size": 108, "owner": { "name": "mashijp", "email": "(ry" }, "private": false, "open_issues": 0, "has_issues": true, "has_downloads": true, "has_wiki": true, "created_at": 1366902142, "pushed_at": 1366906300, "master_branch": "master" }, "pusher": { "name": "mashijp", "email": "(ry" } }
ブランチがきられ、pushされたときは
{ "ref": "refs/heads/develop", "after": "0ce9e6e68576a18c073aaf6fadd5b93aef850811", "before": "0000000000000000000000000000000000000000", "created": true, "deleted": false, "forced": true, "compare": "https://github.com/mashijp/gitstudy/commit/0ce9e6e68576", "commits": [ { "id": "0ce9e6e68576a18c073aaf6fadd5b93aef850811", "distinct": true, "message": "doyaa", "timestamp": "2013-04-25T09:13:55-07:00", "url": "https://github.com/mashijp/gitstudy/commit/0ce9e6e68576a18c073aaf6fadd5b93aef850811", "author": { "name": "mashijp", "email": "(ry", "username": "mashijp" }, "committer": { "name": "mashijp", "email": "(ry", "username": "mashijp" }, "added": [ "pyo" ], "removed": [ ], "modified": [ ] } ], "head_commit": { "id": "0ce9e6e68576a18c073aaf6fadd5b93aef850811", "distinct": true, "message": "doyaa", "timestamp": "2013-04-25T09:13:55-07:00", "url": "https://github.com/mashijp/gitstudy/commit/0ce9e6e68576a18c073aaf6fadd5b93aef850811", "author": { "name": "mashijp", "email": "(ry", "username": "mashijp" }, "committer": { "name": "mashijp", "email": "(ry", "username": "mashijp" }, "added": [ "pyo" ], "removed": [ ], "modified": [ ] }, "repository": { "id": 9674385, "name": "gitstudy", "url": "https://github.com/mashijp/gitstudy", "description": "", "watchers": 0, "stargazers": 0, "forks": 0, "fork": false, "size": 108, "owner": { "name": "mashijp", "email": "(ry" }, "private": false, "open_issues": 0, "has_issues": true, "has_downloads": true, "has_wiki": true, "created_at": 1366902142, "pushed_at": 1366906447, "master_branch": "master" }, "pusher": { "name": "mashijp", "email": "(ry" } }
こんな通知がきたよ。というメモ。
"created": true が来たら新しいタグ or ブランチ作成かな?