Skip to content

Commit 95bd65b

Browse files
authored
Merge pull request #241 from PyCampES/check-issue
2 parents e510d87 + 6e0d1c7 commit 95bd65b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/create_issue.py

+10
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@
1515
g = Github(os.environ.get('GITHUB_TOKEN'))
1616

1717
repo = g.get_repo('PyCampES/python-docs-es')
18+
19+
20+
issues = repo.get_issues(state='open')
21+
for issue in issues:
22+
if pofilename in issue.title:
23+
msg = f'There is a similar issue already created at {issue.html_url}.\nDo you want to create it anyways? [y/N] '
24+
answer = input(msg)
25+
if answer != 'y':
26+
sys.exit(1)
27+
1828
# https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html#github.Repository.Repository.create_issue
1929
issue = repo.create_issue(
2030
title=f'Translate `{pofilename}`',

0 commit comments

Comments
 (0)