Skip to content

Commit

Permalink
Improve PR description
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-codechimp committed Feb 20, 2024
1 parent 801b79f commit f6f3f8a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/new_device.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ jobs:
set_output("mm", "_".join(re.findall(r"\w+",f"{new_device['manufacturer']}{new_device['model']})".lower())))
set_output("manufacturer", "_".join(re.findall(r"\w+",f"{new_device['manufacturer']})")))
set_output("model", "_".join(re.findall(r"\w+",f"{new_device['model']})")))
set_output("bqt", f"{new_device['battery_quantity']}x {new_device['battery_type']}")
if duplicate_found:
set_output("mode", "Updates")
else:
set_output("mode", "Adds")
with open("custom_components/battery_notes/data/library.json", "w") as f:
f.write(json.dumps(devices_json, indent=4))
Expand All @@ -90,7 +96,7 @@ jobs:
with:
commit-message: "Update device: ${{ steps.update-json.outputs.model }} by ${{ steps.update-json.outputs.manufacturer }}"
title: "Device: ${{ steps.update-json.outputs.manufacturer }} - ${{ steps.update-json.outputs.model }}"
body: "This pull request adds or updates the device information for ${{ steps.update-json.outputs.model }} by ${{ steps.update-json.outputs.manufacturer }}\nIt closes issue #${{ github.event.issue.number }}"
body: "This pull request ${{ steps.update-json.outputs.mode }} the device information for ${{ steps.update-json.outputs.model }} by ${{ steps.update-json.outputs.manufacturer }} with ${{ steps.update-json.outputs.bqt }}\nIt closes issue #${{ github.event.issue.number }}"
branch: "device-${{ steps.update-json.outputs.mm }}"

- name: Close Issue
Expand Down

0 comments on commit f6f3f8a

Please sign in to comment.