Skip to content

Commit

Permalink
Add MDN URL to the issue template
Browse files Browse the repository at this point in the history
Fixes #375.
  • Loading branch information
zcorpan committed Dec 16, 2024
1 parent f0b84e6 commit 1ba9650
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

* Specification title:
* Specification or proposal URL (if available):
* Explainer URL (if available):
* Explainer URL (if available):
* Proposal author(s) (`@`-mention GitHub accounts):
* MDN URL (optional):
* Caniuse.com URL (optional):
* Bugzilla URL (optional):
* Mozillians who can provide input (optional):
* Mozillians who can provide input (optional):
* WebKit standards-position:

### Other information
Expand Down
4 changes: 3 additions & 1 deletion gh-data.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def process_body(issue):
"title": None,
"url": None,
"explainer": None,
"mdn": None,
"caniuse": None,
"bug": None,
"webkit": None,
Expand All @@ -94,6 +95,7 @@ def process_body(issue):
"specification or proposal url": "url",
"explainer url (if available)": "explainer",
"explainer url": "explainer",
"mdn url (optional)": "mdn",
"caniuse.com url (optional)": "caniuse",
"caniuse.com url": "caniuse",
"bugzilla url (optional)": "bug",
Expand All @@ -110,7 +112,7 @@ def process_body(issue):
if line.lower().startswith(text_title):
value = line[len(text_title) :].strip()
value = re.sub(r"\[[^\]]+\]\(([^\)]+)\)", r"\1", value)
if key in ("url", "explainer", "caniuse", "bug", "webkit"):
if key in ("url", "explainer", "mdn", "caniuse", "bug", "webkit"):
value = get_url(value)
if value != "" and value.lower() != "n/a":
body[key] = value
Expand Down

0 comments on commit 1ba9650

Please sign in to comment.