Skip to content

Commit ea37631

Browse files
committed
Change to pull requests
1 parent 1b5d9ca commit ea37631

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/generate_model.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ jobs:
3838
run: |
3939
python duck_chat/models/generate_models.py
4040
41-
- uses: stefanzweifel/git-auto-commit-action@v5
41+
- name: Create Pull Request
42+
uses: peter-evans/create-pull-request@v6
4243
with:
43-
commit_message: "Auto-generated model_type.py"
44-
file_pattern: "duck_chat/models/model_type.py"
44+
commit_message: Auto-generated model_type.py
45+
title: Update Models
46+
branch: update-models
4547
env:
4648
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

duck_chat/models/generate_models.py

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def parse_html(html) -> dict[str, str]:
5353
def write_models(data: dict[str, str], path: Path) -> None:
5454
"""Generate new model_type.py"""
5555
with open(path, "w") as f:
56+
f.write("# Test")
5657
f.write("from enum import Enum\n\n\nclass ModelType(Enum):\n")
5758
for k, v in data.items():
5859
f.write(f' {k} = "{v}"\n')

0 commit comments

Comments
 (0)