Skip to content
This repository was archived by the owner on Sep 5, 2022. It is now read-only.

Commit e8aaf39

Browse files
committed
filter out forbidden characters from project id
1 parent 8303f8a commit e8aaf39

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
setup(
2121
name='youtrack-scripts',
22-
version='0.1.15',
22+
version='0.1.16',
2323
python_requires='>=2.6, <3',
2424
packages=['youtrackutils',
2525
'youtrackutils.bugzilla',

youtrackutils/github2youtrack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
sys.exit(1)
88

99
import os
10+
import re
1011
import requests
1112
import csv
1213
import youtrackutils.csvClient
@@ -114,7 +115,6 @@ def main():
114115

115116
if github_repo.find('/') > -1:
116117
github_repo_owner, github_repo = github_repo.split('/')
117-
github_repo = github_repo.replace('/', '_').replace('-', '_')
118118
else:
119119
github_repo_owner = github_user
120120

@@ -176,7 +176,7 @@ def write_issues(r, issues_csvout, comments_csvout, repo, auth):
176176
if not author:
177177
author = get_last_part_of_url(issue['user'].get('url'))
178178

179-
project = get_last_part_of_url(repo)
179+
project = re.sub(r'[^\w]', '_', get_last_part_of_url(repo))
180180

181181
milestone = issue.get('milestone')
182182
if milestone:

0 commit comments

Comments
 (0)