[FIX] runbot: fix pull info

This commit is contained in:
Xavier-Do 2022-11-21 16:45:31 +01:00
parent 2e77a55ddb
commit f2d71a0b79
4 changed files with 5 additions and 5 deletions

View File

@ -119,7 +119,7 @@ class Branch(models.Model):
branch.pull_head_name = pi['head']['label']
branch.pr_title = pi['title']
branch.pr_body = pi['body']
branch.pr_author = pi['creator']['login']
branch.pr_author = pi['user']['login']
pull_head_repo_name = False
if pi['head'].get('repo'):
pull_head_repo_name = pi['head']['repo'].get('full_name')

View File

@ -15,7 +15,7 @@ class TestBranch(RunbotCase):
'head': {'label': 'foo-dev:bar_branch', 'repo': {'full_name': 'foo-dev/bar'}},
'title': '[IMP] Title',
'body': 'Body',
'creator': {
'user': {
'login': 'Pr author'
},
}
@ -126,7 +126,7 @@ class TestBranchRelations(RunbotCase):
'head': {'label': 'dev:master-test-tri-imp', 'repo': {'full_name': 'dev/server'}},
'title': '[IMP] Title',
'body': 'Body',
'creator': {
'user': {
'login': 'Pr author'
},
}

View File

@ -66,7 +66,7 @@ class TestRepo(RunbotCaseMinimalSetup):
'head': {'label': 'dev:%s' % branch_name, 'repo': {'full_name': 'dev/server'}},
'title': '[IMP] Title',
'body': 'Body',
'creator': {
'user': {
'login': 'Pr author'
},
}

View File

@ -50,7 +50,7 @@ class Runbot(models.AbstractModel):
},
'title': '[IMP] Title',
'body': 'Body',
'creator': {
'user': {
'login': 'Pr author'
},
}