worflow-pr: wip
This commit is contained in:
parent
2d12899da5
commit
0c866e8f89
@ -362,7 +362,8 @@ func processPullNotification(gitea common.Gitea, thread *models.NotificationThre
|
||||
}
|
||||
}()
|
||||
|
||||
git, err := common.CreateGitHandler(GitAuthor, "noaddress@suse.de", BotName)
|
||||
gh := common.GitHandlerImpl{}
|
||||
git, err := gh.CreateGitHandler(GitAuthor, "noaddress@suse.de", BotName)
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
|
@ -64,13 +64,14 @@ prjMaintainer:
|
||||
|
||||
func CheckIfMaintainersApproved(gitea GiteaMaintainershipInterface, config common.AutogitConfig, prjGitPRNumber int64) (bool, error) {
|
||||
gitea.GetPullRequestAndReviews(config.Organization, config.GitProjectName, prjGitPRNumber)
|
||||
gitea.FetchMaintainershipFile(config.Organization, config.GitProjectName, config.Branch)
|
||||
data, _ := gitea.FetchMaintainershipFile(config.Organization, config.GitProjectName, config.Branch)
|
||||
|
||||
parseMaintainershipData(data)
|
||||
/*
|
||||
pr, reviews, _ := gitea.GetPullRequestAndReviews(config.Organization, config.GitProjectName, prjGitPRNumber)
|
||||
data, _ := gitea.FetchMaintainershipFile(config.Organization, config.GitProjectName, config.Branch)
|
||||
pr, reviews, _ := gitea.GetPullRequestAndReviews(config.Organization, config.GitProjectName, prjGitPRNumber)
|
||||
data, _ := gitea.FetchMaintainershipFile(config.Organization, config.GitProjectName, config.Branch)
|
||||
|
||||
maintainers, _ := parseMaintainershipData(data)
|
||||
*/
|
||||
maintainers, _ := parseMaintainershipData(data)
|
||||
*/
|
||||
return false, nil
|
||||
}
|
||||
|
5
workflow-pr/pr.go
Normal file
5
workflow-pr/pr.go
Normal file
@ -0,0 +1,5 @@
|
||||
package main
|
||||
|
||||
//go:generate mockgen -source=pr.go -destination=mock/pr.go -typed
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package main
|
||||
|
||||
//go:generate mockgen -source=pr.go -destination=mock/pr.go -typed
|
||||
//go:generate mockgen -source=pr_processor.go -destination=mock/pr_processor.go -typed
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
10
workflow-pr/pr_test.go
Normal file
10
workflow-pr/pr_test.go
Normal file
@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestPR(t *testing.T) {
|
||||
t.Run("Test simple PR to PrjGit checkout", func(t *testing.T) {
|
||||
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user