HasDeployKey returns true if public key is a deploy key of given repository.
(keyID, repoID int64)
| 642 | |
| 643 | // HasDeployKey returns true if public key is a deploy key of given repository. |
| 644 | func HasDeployKey(keyID, repoID int64) bool { |
| 645 | has, _ := x.Where("key_id = ? AND repo_id = ?", keyID, repoID).Get(new(DeployKey)) |
| 646 | return has |
| 647 | } |
| 648 | |
| 649 | // AddDeployKey add new deploy key to database and authorized_keys file. |
| 650 | func AddDeployKey(repoID int64, name, content string) (*DeployKey, error) { |
no test coverage detected