This commit is contained in:
2024-12-09 00:39:55 +01:00
parent db766bacc3
commit 7433ac1d3a
7 changed files with 121 additions and 75 deletions

View File

@@ -60,6 +60,10 @@ type GiteaPRFetcher interface {
GetAssociatedPRs(org, repo string, prNo int64) ([]*models.PullRequest, error)
}
type GiteaMaintainershipInterface interface {
FetchMaintainershipFile(org, prjGit, branch string) ([]byte, error)
}
type Gitea interface {
GetPullRequestAndReviews(org, project string, num int64) (*models.PullRequest, []*models.PullReview, error)
GetPullNotifications(since *time.Time) ([]*models.NotificationThread, error)
@@ -76,6 +80,7 @@ type Gitea interface {
GetRecentPullRequests(org, repo string) ([]*models.PullRequest, error)
GetRecentCommits(org, repo, branch string, commitNo int64) ([]*models.Commit, error)
GiteaMaintainershipInterface
GiteaPRFetcher
}
@@ -416,7 +421,7 @@ func (gitea *GiteaTransport) GetAssociatedPRs(org, repo string, prNo int64) ([]*
repository.NewRepoGetPullRequestParams().
WithOwner(org).
WithRepo(repo).
WithIndex(prNo),
WithIndex(prNo),
gitea.transport.DefaultAuthentication)
if err != nil {
@@ -426,7 +431,6 @@ func (gitea *GiteaTransport) GetAssociatedPRs(org, repo string, prNo int64) ([]*
desc := prData.Payload.Body
strings.Split(desc, "\n")
return nil, nil
}