MCPcopy Create free account
hub / github.com/gogs/gogs / PatchPath

Method PatchPath

internal/database/repo.go:704–710  ·  view source on GitHub ↗

PatchPath returns corresponding patch file path of repository by given issue ID.

(index int64)

Source from the content-addressed store, hash-verified

702
703// PatchPath returns corresponding patch file path of repository by given issue ID.
704func (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.
713func (r *Repository) SavePatch(index int64, patch []byte) error {

Callers 2

SavePatchMethod · 0.95
testPatchMethod · 0.80

Implementers 2

Repositoryinternal/database/repo.go
mailerRepointernal/database/issue_mail.go

Calls 2

GetOwnerMethod · 0.95
RepoPathFunction · 0.85

Tested by

no test coverage detected