Skip to content

Commit f978b42

Browse files
authored
Modify README links so that appropriate project label is added to the issue (#22)
* Modify README links so that appropriate project label is added to the issue * Fix language link to be properly URL encoded * Need to bump version * Need to update min version of subete
1 parent 94b98e6 commit f978b42

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,3 +115,5 @@ dmypy.json
115115

116116

117117
.idea/
118+
119+
/requirements-dev.txt

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
snakemd~=2.0.0b1
2-
subete~=0.14
2+
subete~=0.15.1
33
pytest~=6.2
44
pytest-cov~=2.12
55
setuptools~=57.0

ronbun/readme.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import logging
33
import ssl
4+
import urllib.parse
45

56
from snakemd import Document, Inline, MDList, Paragraph
67
from subete import LanguageCollection, Repo, Project
@@ -10,7 +11,7 @@
1011

1112

1213
issue_url_template_base = "https://github.com/TheRenegadeCoder/sample-programs/issues/new"
13-
issue_url_template_query = "?assignees=&labels=enhancement&template=code-snippet-request.md&title=Add+{project}+in+{language}"
14+
issue_url_template_query = "?assignees=&labels=enhancement,{label}&template=code-snippet-request.md&title=Add+{project}+in+{language}"
1415

1516

1617
def main():
@@ -82,7 +83,11 @@ def _generate_missing_program_list(language: LanguageCollection, missing_program
8283
program: Project
8384
program_name = program.name()
8485
program_query = "+".join(program_name.split())
85-
url = issue_url_template_base + issue_url_template_query.format(project=program_query, language=language.pathlike_name())
86+
url = issue_url_template_base + issue_url_template_query.format(
87+
label=program_query.lower(),
88+
project=program_query,
89+
language=urllib.parse.quote(language.name())
90+
)
8691
program_item = Paragraph([f":x: {program_name} [Requirements]"])\
8792
.insert_link(program_name, url)\
8893
.insert_link("Requirements", program.requirements_url())

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="ronbun",
8-
version="0.7.1",
8+
version="0.7.2",
99
author="The Renegade Coder",
1010
author_email="jeremy.grifski@therenegadecoder.com",
1111
description="The Sample Programs README Automation Tool",
@@ -15,7 +15,7 @@
1515
packages=setuptools.find_packages(),
1616
install_requires=[
1717
"SnakeMD>=2.0.0b1",
18-
"subete>=0.11"
18+
"subete>=0.15.1"
1919
],
2020
entry_points={
2121
"console_scripts": [

0 commit comments

Comments
 (0)