1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-19 21:30:10 +01:00

Don't open second MR for gradle (Closes: #914)

Traceback (most recent call last):
  File "/builds/fdroid/fdroidserver/./tests/gradle-release-checksums.py", line 130, in <module>
    mr = project.mergerequests.create({
  File "/usr/lib/python3/dist-packages/gitlab/exceptions.py", line 281, in wrapped_f
    raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabCreateError: 409: ['Another open merge request already exists for this source branch: !1064']
This commit is contained in:
Jochen Sprickerhof 2021-12-30 10:00:46 +01:00
parent 5f43fdccd4
commit 460dffe82b

View File

@ -127,13 +127,16 @@ if git_repo.is_dirty() and ('gradlew-fdroid' in modified or 'makebuildserver' in
'\n\n<p><small>generated by <a href="%s/-/jobs/%s">GitLab CI Job #%s</a></small></p>'
% (os.getenv('CI_PROJECT_URL'), os.getenv('CI_JOB_ID'), os.getenv('CI_JOB_ID'))
)
mr = project.mergerequests.create({
'source_branch': branch.name,
'target_project_id': 36527, # fdroid/fdroidserver
'target_branch': 'master',
'title': 'update to gradle v' + version,
'description': description,
'labels': ['fdroid-bot', 'gradle'],
'remove_source_branch': True,
})
mr.save()
try:
mr = project.mergerequests.create({
'source_branch': branch.name,
'target_project_id': 36527, # fdroid/fdroidserver
'target_branch': 'master',
'title': 'update to gradle v' + version,
'description': description,
'labels': ['fdroid-bot', 'gradle'],
'remove_source_branch': True,
})
mr.save()
except gitlab.exceptions.GitlabCreateError as e:
print(e.error_message)