Commit 522bf484 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

pareil pour les URLs…

parent 4d209d97
Pipeline #14264 failed with stage
in 55 seconds
...@@ -32,18 +32,19 @@ def update_issues_pr(): ...@@ -32,18 +32,19 @@ def update_issues_pr():
if issue.pull_request is None: if issue.pull_request is None:
db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo, db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo,
number=issue.number, number=issue.number,
url=url,
is_issue=True, is_issue=True,
defaults={'title': issue.title}) defaults={'title': issue.title, 'url': url})
else: else:
db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo, db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo,
number=issue.number, number=issue.number,
url=url,
is_issue=False, is_issue=False,
defaults={'title': issue.title}) defaults={'title': issue.title, 'url': url})
if db_issue.title != issue.title: if db_issue.title != issue.title:
db_issue.title = issue.title db_issue.title = issue.title
db_issue.save() db_issue.save()
if db_issue.url != issue.url:
db_issue.url = issue.url
db_issue.save()
except github.UnknownObjectException: except github.UnknownObjectException:
print(f'Project not found: {project.main_namespace.slug}/{project.slug}') print(f'Project not found: {project.main_namespace.slug}/{project.slug}')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment