Compare commits
2 Commits
t-mergemod
...
main
| Author | SHA256 | Date | |
|---|---|---|---|
| 7ec663db27 | |||
| 3b83ba96e4 |
@@ -92,10 +92,13 @@ func ConnectToExchangeForPublish(host, username, password string) {
|
||||
auth = username + ":" + password + "@"
|
||||
}
|
||||
|
||||
connection, err := rabbitmq.DialTLS("amqps://"+auth+host, &tls.Config{
|
||||
ServerName: host,
|
||||
connection, err := rabbitmq.DialConfig("amqps://"+auth+host, rabbitmq.Config{
|
||||
Dial: rabbitmq.DefaultDial(10 * time.Second),
|
||||
TLSClientConfig: &tls.Config{
|
||||
ServerName: host,
|
||||
},
|
||||
})
|
||||
failOnError(err, "Cannot connect to rabbit.opensuse.org")
|
||||
failOnError(err, "Cannot connect to "+host)
|
||||
defer connection.Close()
|
||||
|
||||
ch, err := connection.Channel()
|
||||
|
||||
@@ -470,7 +470,8 @@ func (pr *PRProcessor) Process(req *models.PullRequest) error {
|
||||
if pr.PR.State == "open" {
|
||||
org, repo, idx := pr.PRComponents()
|
||||
if prjGitPR.PR.HasMerged {
|
||||
Gitea.AddComment(pr.PR, "This PR is merged via the associated Project PR.")
|
||||
// TODO: use timeline here because this can spam if ManualMergePR fails
|
||||
// Gitea.AddComment(pr.PR, "This PR is merged via the associated Project PR.")
|
||||
err = Gitea.ManualMergePR(org, repo, idx, pr.PR.Head.Sha, false)
|
||||
if _, ok := err.(*repository.RepoMergePullRequestConflict); !ok {
|
||||
common.PanicOnError(err)
|
||||
|
||||
Reference in New Issue
Block a user