Commit 4d209d97 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

in that case: update title

parent 3b9b8613
Pipeline #14263 passed with stage
in 55 seconds
......@@ -30,18 +30,20 @@ def update_issues_pr():
url = re.sub('api\\.github\\.com/repos', 'github.com', issue.url)
if issue.pull_request is None:
IssuePr.objects.get_or_create(repo=main_repo,
db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo,
number=issue.number,
url=url,
is_issue=True,
defaults={'title': issue.title})
else:
IssuePr.objects.get_or_create(repo=main_repo,
db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo,
number=issue.number,
url=url,
is_issue=False,
defaults={'title': issue.title})
if db_issue.title != issue.title:
db_issue.title = issue.title
db_issue.save()
except github.UnknownObjectException:
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