{"action":"created","issue":{"url":"https://api.github.com/repos/src-d/go-git/issues/911","repository_url":"https://api.github.com/repos/src-d/go-git","labels_url":"https://api.github.com/repos/src-d/go-git/issues/911/labels{/name}","comments_url":"https://api.github.com/repos/src-d/go-git/issues/911/comments","events_url":"https://api.github.com/repos/src-d/go-git/issues/911/events","html_url":"https://github.com/src-d/go-git/issues/911","id":348993812,"node_id":"MDU6SXNzdWUzNDg5OTM4MTI=","number":911,"title":"how to create a new tag?","user":{"login":"ycyxuehan","id":26104670,"node_id":"MDQ6VXNlcjI2MTA0Njcw","avatar_url":"https://avatars2.githubusercontent.com/u/26104670?v=4","gravatar_id":"","url":"https://api.github.com/users/ycyxuehan","html_url":"https://github.com/ycyxuehan","followers_url":"https://api.github.com/users/ycyxuehan/followers","following_url":"https://api.github.com/users/ycyxuehan/following{/other_user}","gists_url":"https://api.github.com/users/ycyxuehan/gists{/gist_id}","starred_url":"https://api.github.com/users/ycyxuehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycyxuehan/subscriptions","organizations_url":"https://api.github.com/users/ycyxuehan/orgs","repos_url":"https://api.github.com/users/ycyxuehan/repos","events_url":"https://api.github.com/users/ycyxuehan/events{/privacy}","received_events_url":"https://api.github.com/users/ycyxuehan/received_events","type":"User","site_admin":false},"labels":[{"id":276436463,"node_id":"MDU6TGFiZWwyNzY0MzY0NjM=","url":"https://api.github.com/repos/src-d/go-git/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-09T06:26:21Z","updated_at":"2018-11-08T07:06:30Z","closed_at":"2018-10-24T16:12:30Z","author_association":"NONE","body":"hi, how to create a new tag? i kown how to create a branch, and now, i want to create a tag, how cant i do it? thanks."},"comment":{"url":"https://api.github.com/repos/src-d/go-git/issues/comments/436894237","html_url":"https://github.com/src-d/go-git/issues/911#issuecomment-436894237","issue_url":"https://api.github.com/repos/src-d/go-git/issues/911","id":436894237,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjg5NDIzNw==","user":{"login":"ycyxuehan","id":26104670,"node_id":"MDQ6VXNlcjI2MTA0Njcw","avatar_url":"https://avatars2.githubusercontent.com/u/26104670?v=4","gravatar_id":"","url":"https://api.github.com/users/ycyxuehan","html_url":"https://github.com/ycyxuehan","followers_url":"https://api.github.com/users/ycyxuehan/followers","following_url":"https://api.github.com/users/ycyxuehan/following{/other_user}","gists_url":"https://api.github.com/users/ycyxuehan/gists{/gist_id}","starred_url":"https://api.github.com/users/ycyxuehan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ycyxuehan/subscriptions","organizations_url":"https://api.github.com/users/ycyxuehan/orgs","repos_url":"https://api.github.com/users/ycyxuehan/repos","events_url":"https://api.github.com/users/ycyxuehan/events{/privacy}","received_events_url":"https://api.github.com/users/ycyxuehan/received_events","type":"User","site_admin":false},"created_at":"2018-11-08T07:06:30Z","updated_at":"2018-11-08T07:06:30Z","author_association":"NONE","body":"> @ycyxuehan the repo contains an example for creating new references:\r\n> \r\n> [go-git/_examples/branch/main.go](https://github.com/src-d/go-git/blob/1fdd36c814746efdf199392135696cfde7287b44/_examples/branch/main.go#L29-L38)\r\n> \r\n> Lines 29 to 38 in [1fdd36c](/src-d/go-git/commit/1fdd36c814746efdf199392135696cfde7287b44)\r\n> \r\n>  // Create a new plumbing.HashReference object with the name of the branch \r\n>  // and the hash from the HEAD. The reference name should be a full reference \r\n>  // name and not an abbreviated one, as is used on the git cli. \r\n>  // \r\n>  // For tags we should use `refs/tags/%s` instead of `refs/heads/%s` used \r\n>  // for branches. \r\n>  ref := plumbing.NewHashReference(\"refs/heads/my-branch\", headRef.Hash()) \r\n>   \r\n>  // The created reference is saved in the storage. \r\n>  err = r.Storer.SetReference(ref)\r\n\r\nthanks ,i will try"}}
{"actor":{"display_login":"ycyxuehan"}}