This commit is contained in:
Brad Rydzewski 2014-10-24 08:52:42 -07:00
parent 38fd589083
commit 1fd1c5e292

View file

@ -225,8 +225,7 @@ func CreateUpdateKey(client *github.Client, owner, name, title, key string) (*gi
if k != nil {
k.Title = github.String(title)
k.Key = github.String(key)
var updated, _, err = client.Repositories.EditKey(owner, name, *k.ID, k)
return updated, err
client.Repositories.DeleteKey(owner, name, *k.ID)
}
return CreateKey(client, owner, name, title, key)