Commit 3b9b8613 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

issue & PR titles may change

parent 57f19baa
Pipeline #14262 passed with stage
in 1 minute and 28 seconds
...@@ -30,18 +30,18 @@ def update_issues_pr(): ...@@ -30,18 +30,18 @@ def update_issues_pr():
url = re.sub('api\\.github\\.com/repos', 'github.com', issue.url) url = re.sub('api\\.github\\.com/repos', 'github.com', issue.url)
if issue.pull_request is None: if issue.pull_request is None:
IssuePr.objects.get_or_create(title=issue.title, IssuePr.objects.get_or_create(repo=main_repo,
repo=main_repo,
number=issue.number, number=issue.number,
url=url, url=url,
is_issue=True) is_issue=True,
defaults={'title': issue.title})
else: else:
IssuePr.objects.get_or_create(title=issue.title, IssuePr.objects.get_or_create(repo=main_repo,
repo=main_repo,
number=issue.number, number=issue.number,
url=url, url=url,
is_issue=False) is_issue=False,
defaults={'title': issue.title})
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