Update PR templates + autogenerate (#31032)

* update templates

* same as before

* no tuning

* same as before

* move up
pull/31033/head
Justin Newberry 1 year ago committed by GitHub
parent 86ac700805
commit f6cd009c77
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      .github/PULL_REQUEST_TEMPLATE/car_port.md
  2. 6
      .github/PULL_REQUEST_TEMPLATE/fingerprint.md
  3. 3
      .github/PULL_REQUEST_TEMPLATE/tuning.md
  4. 30
      .github/build.py
  5. 38
      .github/pull_request_template.md

@ -8,7 +8,7 @@ assignees: ''
**Checklist** **Checklist**
- [ ] added to README - [ ] added entry to CarInfo in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py) - [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
- [ ] route with openpilot: - [ ] route with openpilot:
- [ ] route with stock system: - [ ] route with stock system:

@ -6,6 +6,8 @@ labels: 'fingerprint'
assignees: '' assignees: ''
--- ---
Discord username: [] **Car**
Which car (make, model, year) this fingerprint is for
Route: [] **Route**
A route with the fingerprint

@ -28,5 +28,4 @@ Longitudinal:
Lateral: Lateral:
* Straight driving at ~25, ~45 and ~65mph * Straight driving at ~25, ~45 and ~65mph
* Turns driving at ~25, ~45 and ~65mph * Turns driving at ~25, ~45 and ~65mph
-->
-->

@ -0,0 +1,30 @@
import pathlib
GITHUB_FOLDER = pathlib.Path(__file__).parent
PULL_REQUEST_TEMPLATES = (GITHUB_FOLDER / "PULL_REQUEST_TEMPLATE")
order = ["fingerprint", "car_bugfix", "bugfix", "car_port", "refactor"]
def create_pull_request_template():
with open(GITHUB_FOLDER / "pull_request_template.md", "w") as f:
f.write("<!-- Please copy and paste the relevant template -->\n\n")
for t in order:
template = PULL_REQUEST_TEMPLATES / f"{t}.md"
text = template.read_text()
# Remove metadata for GitHub
start = text.find("---")
end = text.find("---", start+1)
text = text[end + 4:]
# Remove comments
text = text.replace("<!-- ", "").replace("-->", "")
f.write(f"<!--- ***** Template: {template.stem.replace('_', ' ').title()} *****\n")
f.write(text)
f.write("\n\n")
f.write("-->\n\n")
create_pull_request_template()

@ -10,39 +10,59 @@ A route with the fingerprint
--> -->
<!--- ***** Template: Car bug fix ***** <!--- ***** Template: Car Bugfix *****
**Description** [](A description of the bug and the fix. Also link any relevant issues.) **Description**
**Verification** [](Explain how you tested this bug fix.) A description of the bug and the fix. Also link the issue if it exists.
**Verification**
Explain how you tested this bug fix.
**Route** **Route**
Route: [a route with the bug fix] Route: [a route with the bug fix]
--> -->
<!--- ***** Template: Bug fix ***** <!--- ***** Template: Bugfix *****
**Description**
A description of the bug and the fix. Also link the issue if it exists.
**Verification**
**Description** [](A description of the bug and the fix. Also link any relevant issues.) Explain how you tested this bug fix.
**Verification** [](Explain how you tested this bug fix.)
--> -->
<!--- ***** Template: Car port ***** <!--- ***** Template: Car Port *****
**Checklist** **Checklist**
- [ ] added entry to CarInfo in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs - [ ] added entry to CarInfo in selfdrive/car/*/values.py and ran `selfdrive/car/docs.py` to generate new docs
- [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py) - [ ] test route added to [routes.py](https://github.com/commaai/openpilot/blob/master/selfdrive/car/tests/routes.py)
- [ ] route with openpilot: - [ ] route with openpilot:
- [ ] route with stock system: - [ ] route with stock system:
- [ ] car harness used (if comma doesn't sell it, put N/A):
--> -->
<!--- ***** Template: Refactor ***** <!--- ***** Template: Refactor *****
**Description** [](A description of the refactor, including the goals it accomplishes.) **Description**
A description of the refactor, including the goals it accomplishes.
**Verification**
Explain how you tested the refactor for regressions.
**Verification** [](Explain how you tested the refactor for regressions.)
--> -->

Loading…
Cancel
Save