Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc7df80

Browse files
committed
Script to easily create issues on GH
1 parentcc9012d commitfc7df80

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

‎scripts/create_issue.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
importos
2+
importsys
3+
importsubprocess
4+
importprint_percentage
5+
6+
fromgithubimportGithub
7+
8+
9+
iflen(sys.argv)!=2:
10+
print('Specify PO filename')
11+
sys.exit(1)
12+
13+
pofilename=sys.argv[1]
14+
percentage=print_percentage.get_percent_translated(pofilename)
15+
16+
g=Github(os.environ.get('GITHUB_TOKEN'))
17+
18+
repo=g.get_repo('PyCampES/python-docs-es')
19+
# https://pygithub.readthedocs.io/en/latest/github_objects/Repository.html#github.Repository.Repository.create_issue
20+
issue=repo.create_issue(
21+
title=f'Translate `{pofilename}`',
22+
body=f'''This file is at{percentage}% translated. It needs to reach 100% translated.
23+
24+
Please, comment here if you want this file to be assigned to you and an member will assign it to you as soon as possible, so you can start working on it.
25+
26+
Remember to follow the steps in our [Contributing Guide](https://python-docs-es.readthedocs.io/es/3.7/CONTRIBUTING.html)''',
27+
)
28+
print(f'Issue created at{issue.html_url}')

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp