diff --git a/runbot/models/branch.py b/runbot/models/branch.py index 18bf6f69..7ad4db4e 100644 --- a/runbot/models/branch.py +++ b/runbot/models/branch.py @@ -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') diff --git a/runbot/tests/test_branch.py b/runbot/tests/test_branch.py index 44e163e9..1f7e18ac 100644 --- a/runbot/tests/test_branch.py +++ b/runbot/tests/test_branch.py @@ -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' }, } diff --git a/runbot/tests/test_repo.py b/runbot/tests/test_repo.py index ae1bc83f..26a2d825 100644 --- a/runbot/tests/test_repo.py +++ b/runbot/tests/test_repo.py @@ -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' }, } diff --git a/runbot_populate/models/runbot.py b/runbot_populate/models/runbot.py index 983d4a0c..9274d066 100644 --- a/runbot_populate/models/runbot.py +++ b/runbot_populate/models/runbot.py @@ -50,7 +50,7 @@ class Runbot(models.AbstractModel): }, 'title': '[IMP] Title', 'body': 'Body', - 'creator': { + 'user': { 'login': 'Pr author' }, }