PatchPath returns corresponding patch file path of repository by given issue ID.
(index int64)
| 702 | |
| 703 | // PatchPath returns corresponding patch file path of repository by given issue ID. |
| 704 | func (r *Repository) PatchPath(index int64) (string, error) { |
| 705 | if err := r.GetOwner(); err != nil { |
| 706 | return "", err |
| 707 | } |
| 708 | |
| 709 | return filepath.Join(RepoPath(r.Owner.Name, r.Name), "pulls", com.ToStr(index)+".patch"), nil |
| 710 | } |
| 711 | |
| 712 | // SavePatch saves patch data to corresponding location by given issue ID. |
| 713 | func (r *Repository) SavePatch(index int64, patch []byte) error { |
no test coverage detected