Change how merged PR commit info are prepared (#3368)
* Change how merged PR commits and diff are made * Update code.gitea.io/git dependency * Fix typo * Remove unneeded local variable
This commit is contained in:
parent
b0d5bb909b
commit
ca306985d3
4 changed files with 49 additions and 66 deletions
8
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
8
vendor/code.gitea.io/git/repo_commit.go
generated
vendored
|
@ -11,8 +11,8 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// getRefCommitID returns the last commit ID string of given reference (branch or tag).
|
||||
func (repo *Repository) getRefCommitID(name string) (string, error) {
|
||||
// GetRefCommitID returns the last commit ID string of given reference (branch or tag).
|
||||
func (repo *Repository) GetRefCommitID(name string) (string, error) {
|
||||
stdout, err := NewCommand("show-ref", "--verify", name).RunInDir(repo.Path)
|
||||
if err != nil {
|
||||
if strings.Contains(err.Error(), "not a valid ref") {
|
||||
|
@ -25,12 +25,12 @@ func (repo *Repository) getRefCommitID(name string) (string, error) {
|
|||
|
||||
// GetBranchCommitID returns last commit ID string of given branch.
|
||||
func (repo *Repository) GetBranchCommitID(name string) (string, error) {
|
||||
return repo.getRefCommitID(BranchPrefix + name)
|
||||
return repo.GetRefCommitID(BranchPrefix + name)
|
||||
}
|
||||
|
||||
// GetTagCommitID returns last commit ID string of given tag.
|
||||
func (repo *Repository) GetTagCommitID(name string) (string, error) {
|
||||
return repo.getRefCommitID(TagPrefix + name)
|
||||
return repo.GetRefCommitID(TagPrefix + name)
|
||||
}
|
||||
|
||||
// parseCommitData parses commit information from the (uncompressed) raw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue