From af6f22c2107aa432354e56364f0b6ea196b039e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:31:48 +0100 Subject: [PATCH 01/12] Add config for issue templates --- .github/ISSUE_TEMPLATE/config.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..942cb74 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: true +contact_links: + - name: Report a bug with the Picnic Integration + url: https://github.com/home-assistant/core/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22integration%3A%20picnic%22 + about: Please report issues with Picnic in the Home Assistant core repository unless a developer told you otherwise. + - name: I have a question or need support + url: https://www.home-assistant.io/help + about: We use GitHub for tracking bugs, check the Home Assistant website for resources on getting help. + - name: Feature Request + url: https://community.home-assistant.io/c/feature-requests + about: Please use the Home Assistant Community Forum for making feature requests. + - name: I'm unsure where to go + url: https://www.home-assistant.io/join-chat + about: If you are unsure where to go, then joining our chat is recommended; Just ask! From 6e465003b6b62eef0280b17208eb8e77f62664a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:40:07 +0100 Subject: [PATCH 02/12] Add default issue template --- .github/ISSUE_TEMPLATE/bug_report.md | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..9573539 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Python Version:** X.YY + +**Additional context** +Add any other context about the problem here. From f825db8403821fcfcfaced96b0c3a0b6231d5476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:41:30 +0100 Subject: [PATCH 03/12] Disallow blank issues --- .github/ISSUE_TEMPLATE/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 942cb74..657549b 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Report a bug with the Picnic Integration url: https://github.com/home-assistant/core/issues?q=is%3Aissue%20state%3Aopen%20label%3A%22integration%3A%20picnic%22 From 85bc36da96ac9e83b61295e21d5e2e8e07be00c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:47:03 +0100 Subject: [PATCH 04/12] Transform issue template into yaml --- .github/ISSUE_TEMPLATE/bug_report.md | 29 --------------------------- .github/ISSUE_TEMPLATE/bug_report.yml | 20 ++++++++++++++++++ 2 files changed, 20 insertions(+), 29 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 9573539..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Python Version:** X.YY - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..1991bb4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,20 @@ +name: Bug report +description: Create a report to help us improve +title: 'Enter a summary of the issue' +labels: "bug" +body: +- type: markdown + attributes: + value: "**Describe the bug" +- type: textarea + label: A short description about what is happening + required: true +- type: textarea + label: Steps to reproduce the issue + required: true +- type: textarea + label: What did you expect to happen instead? + required: true +- type: input + label: Python Version + placeholder: X.YY From 55012b27f47be68673084c396b2a51a1d7b991a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:48:23 +0100 Subject: [PATCH 05/12] Fix bug report template --- .github/ISSUE_TEMPLATE/bug_report.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 1991bb4..b564a6e 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -7,14 +7,21 @@ body: attributes: value: "**Describe the bug" - type: textarea - label: A short description about what is happening - required: true + attributes: + label: A short description about what is happening + validations: + required: true - type: textarea - label: Steps to reproduce the issue - required: true + attributes: + label: Steps to reproduce the issue + validations: + required: true - type: textarea - label: What did you expect to happen instead? - required: true + attributes: + label: What did you expect to happen instead? + validations: + required: true - type: input - label: Python Version + attributes: + label: Python Version placeholder: X.YY From cdc703888f94d3d3d293bbc1dcb8b2b33f21d332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:48:41 +0100 Subject: [PATCH 06/12] Put placeholder under attributes key --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b564a6e..87cf395 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -24,4 +24,4 @@ body: - type: input attributes: label: Python Version - placeholder: X.YY + placeholder: X.YY From 3c51e046a53951f9e2de7b34f1a5941b093702b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 17:50:09 +0100 Subject: [PATCH 07/12] Remove unnecessary label --- .github/ISSUE_TEMPLATE/bug_report.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 87cf395..7edeb1d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -3,12 +3,9 @@ description: Create a report to help us improve title: 'Enter a summary of the issue' labels: "bug" body: -- type: markdown - attributes: - value: "**Describe the bug" - type: textarea attributes: - label: A short description about what is happening + label: Describe the bug validations: required: true - type: textarea From 7f8e7132a35a2c8166f91168add22fd13c807b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Sun, 23 Feb 2025 18:01:37 +0100 Subject: [PATCH 08/12] Add release template --- .github/release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..6c5ecea --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,14 @@ +changelog: + categories: + - title: ⚠️ Breaking Changes + labels: + - breaking + - title: 🎉 New Features + labels: + - enhancement + - title: 🛠 Bugfixes + labels: + - bug + - title: 👒 Dependencies + labels: + - dependencies From 7d163ef931b44b856637d97ae23e1380c4e81e7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Tue, 25 Feb 2025 14:29:16 +0100 Subject: [PATCH 09/12] Add release CI with trusted publishers --- .github/workflows/release.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..00c8c26 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,30 @@ +name: Release to PyPi +on: [workflow_dispatch] +jobs: + publish: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.11 + uses: actions/setup-python@v2 + with: + python-version: 3.11 + + - name: Install poetry 2.1.1 + run: | + python -m ensurepip + python -m pip install --upgrade pip + python -m pip install poetry==2.1.1 + + - name: Install dependencies + shell: bash + run: python -m poetry install + + - name: Build package + shell: bash + run: python -m poetry build + - name: pypi-publish + uses: pypa/gh-action-pypi-publish@v1.12.4 From e9dd89e69cf93b5709d14ab159954eb9f822fd3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Tue, 25 Feb 2025 14:43:13 +0100 Subject: [PATCH 10/12] Use seperate job for publishing --- .github/workflows/release.yml | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00c8c26..0b808b1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,8 @@ name: Release to PyPi on: [workflow_dispatch] jobs: - publish: + build: runs-on: ubuntu-latest - permissions: - id-token: write steps: - uses: actions/checkout@v2 @@ -26,5 +24,25 @@ jobs: - name: Build package shell: bash run: python -m poetry build - - name: pypi-publish - uses: pypa/gh-action-pypi-publish@v1.12.4 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + pypi-publish: + runs-on: ubuntu-latest + needs: + - build + permissions: + id-token: write + + steps: + - name: Retrieve release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@v1.12.4 From 0474168d47bf462e82ab95d9e692ef3961eff78f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Tue, 25 Feb 2025 14:48:08 +0100 Subject: [PATCH 11/12] Use environment for publishing job --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b808b1..ec275bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,7 @@ jobs: path: dist/ pypi-publish: runs-on: ubuntu-latest + environment: pypi needs: - build permissions: From cac2786df46146ad2e15bf64e88cd25358128ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noah=20Gro=C3=9F?= Date: Tue, 25 Feb 2025 15:05:30 +0100 Subject: [PATCH 12/12] Bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8f747a1..c44dbaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "python-picnic-api2" -version = "1.2.1" +version = "1.2.2" description = "" readme = "README.rst" license = "Apache-2.0"