mirror of
https://github.com/go-gitea/gitea
synced 2025-07-05 18:17:19 +00:00
Remove heads pointing to missing old refs (#17076)
Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@ -41,6 +41,11 @@ func (p *PullRequest) IsForkPullRequest() bool {
|
||||
return p.Head.RepoPath() != p.Base.RepoPath()
|
||||
}
|
||||
|
||||
// GetGitRefName returns pull request relative path to head
|
||||
func (p PullRequest) GetGitRefName() string {
|
||||
return fmt.Sprintf("refs/pull/%d/head", p.Number)
|
||||
}
|
||||
|
||||
// PullRequestBranch represents a pull request branch
|
||||
type PullRequestBranch struct {
|
||||
CloneURL string `yaml:"clone_url"`
|
||||
|
Reference in New Issue
Block a user