File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55"""
66This script transforms a GitHub issue JSON into RST format for coding guidelines.
77
8- It reads a GitHub issue's JSON data from standard input, parses its body
9- (which is expected to follow a specific issue template), and converts it
8+ It reads a GitHub issue's JSON data from standard input, parses its body
9+ (which is expected to follow a specific issue template), and converts it
1010into a formatted reStructuredText (.rst) guideline.
1111
1212Usage:
1313 cat issue.json | uv run python scripts/auto-pr-helper.py
1414 cat issue.json | uv run python scripts/auto-pr-helper.py --save
15+
16+ Location: scripts/auto-pr-helper.py (replaces existing file)
1517"""
1618
1719import argparse
2123from guideline_utils import (
2224 extract_form_fields ,
2325 guideline_template ,
24- normalize_md ,
2526 normalize_list_separation ,
27+ normalize_md ,
2628 save_guideline_file ,
2729)
2830
Original file line number Diff line number Diff line change 1717import sys
1818
1919from guideline_utils import (
20+ chapter_to_filename ,
2021 extract_form_fields ,
2122 guideline_template ,
22- normalize_md ,
2323 normalize_list_separation ,
24- chapter_to_filename ,
24+ normalize_md ,
2525)
2626
2727
Original file line number Diff line number Diff line change 77This module contains common functions used by:
88- auto-pr-helper.py (for automated PR generation)
99- generate-rst-comment.py (for generating preview comments)
10+
11+ Location: scripts/guideline_utils.py
1012"""
1113
14+ import os
1215import re
16+ import sys
1317from textwrap import dedent , indent
1418
1519import pypandoc
1620
17- # Import the template function and header map from the main module
18- import sys
19- import os
20-
2121script_dir = os .path .dirname (os .path .abspath (__file__ ))
2222parent_dir = os .path .abspath (os .path .join (script_dir , ".." ))
2323sys .path .append (parent_dir )
You can’t perform that action at this time.
0 commit comments