Commit dbe4842c authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

format

parent 522bf484
Pipeline #14265 passed with stage
in 1 minute and 25 seconds
...@@ -29,20 +29,15 @@ def update_issues_pr(): ...@@ -29,20 +29,15 @@ def update_issues_pr():
and SKIP_LABEL not in [label.name for label in issue.get_labels()]: and SKIP_LABEL not in [label.name for label in issue.get_labels()]:
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: 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, is_issue=bool(issue.pull_request is None),
is_issue=True, defaults={
defaults={'title': issue.title, 'url': url}) 'title': issue.title,
else: 'url': url,
db_issue, _ = IssuePr.objects.get_or_create(repo=main_repo, })
number=issue.number, if db_issue.title != issue.title or db_issue.url != issue.url:
is_issue=False,
defaults={'title': issue.title, 'url': url})
if db_issue.title != issue.title:
db_issue.title = issue.title db_issue.title = issue.title
db_issue.save()
if db_issue.url != issue.url:
db_issue.url = issue.url db_issue.url = issue.url
db_issue.save() db_issue.save()
......
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