From 0f436fbc819944030262b8a996dd111cf993edc8 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 22 Feb 2021 08:13:28 -0700 Subject: [PATCH 01/11] Workflow update --- .github/workflows/pytest.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index a63ac68e..a7033bc6 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -2,9 +2,7 @@ name: Pytest on: push: - branches: [0.3.0] pull_request: - branches: [0.3.0] schedule: - cron: "0 7 1-28/7 * *" From dbc5bd166212a93d40a49d35f88591c309124a18 Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 08:18:20 -0700 Subject: [PATCH 02/11] Remove duplicate file --- .github/release-drafter.yml | 6 +++--- .github/workflows/relase-drafter.yaml | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) delete mode 100644 .github/workflows/relase-drafter.yaml diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 7df63821..cc6f2ecf 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -3,6 +3,9 @@ tag-template: "$RESOLVED_VERSION" change-template: "- $TITLE @$AUTHOR (#$NUMBER)" sort-direction: ascending categories: + - title: ":boom: Breaking Change :boom:" + labels: + - "breaking-change" - title: ":zap: Enhancments :zap:" labels: - "enhancement" @@ -14,9 +17,6 @@ categories: - "fix" - "bugfix" - "bug" - - title: ":boom: Breaking Change :boom:" - labels: - - "breaking-change" template: | [![Downloads for this release](https://img.shields.io/github/downloads/moralmunky/Home-Assistant-Mail-And-Packages/$RESOLVED_VERSION/total.svg)](https://github.com/moralmunky/Home-Assistant-Mail-And-Packages/releases/$RESOLVED_VERSION) diff --git a/.github/workflows/relase-drafter.yaml b/.github/workflows/relase-drafter.yaml deleted file mode 100644 index fb073c08..00000000 --- a/.github/workflows/relase-drafter.yaml +++ /dev/null @@ -1,16 +0,0 @@ -name: Release Drafter - -on: - push: - branches: - - master - - 0.2.0 - - 0.3.0 - -jobs: - update_release_draft: - runs-on: ubuntu-latest - steps: - - uses: release-drafter/release-drafter@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 314c46393e8027842ee06d252e4ede854f34c1f1 Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 08:22:12 -0700 Subject: [PATCH 03/11] Update requirements_test.txt --- requirements_test.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements_test.txt b/requirements_test.txt index 718f9274..d922a014 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,6 +1,6 @@ +-r requirements.txt +black +isort pytest pytest-cov pytest-homeassistant-custom-component -# From mainfest.json -imageio -python-resize-image From 3077868dfca775f7bcce7e7aeef81f040a40747c Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 08:32:52 -0700 Subject: [PATCH 04/11] Create stale.yml --- .github/workflows/stale.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..f69d147c --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,28 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "30 1 * * *" + +jobs: + stale: + + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v3 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: 'This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions.' + stale-pr-message: 'This PR has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions.' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + days-before-stale: 10 + days-before-close: 5 + days-before-pr-close: -1 + days-before-pr-stale: 14 + exempt-pr-labels: 'awaiting-approval,work-in-progress' From 58b25cad1c5dc424f593b0e712e7a35423f2c323 Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 08:45:08 -0700 Subject: [PATCH 05/11] Add auto label workflow --- .github/labeler.yml | 2 ++ .github/workflows/labeler.yml | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..f923df4a --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,2 @@ +code-quality: tests/* +documentation: docs/* diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..4abdcf98 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,11 @@ +name: "Pull Request Labeler" +on: + pull_request: + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@main + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" From 9789864d366cb0508d44833b46915bbb0018e02d Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 09:00:01 -0700 Subject: [PATCH 06/11] Create linter.yml --- .github/workflows/linter.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml new file mode 100644 index 00000000..e8dcf7aa --- /dev/null +++ b/.github/workflows/linter.yml @@ -0,0 +1,10 @@ +name: "Linting" +on: + pull_request: + +jobs: + linting: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: ricardochaves/python-lint@v1.3.0 From 1e17a5656fd2ff9bb9e6f09252c7d13d8e62ce13 Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 09:02:24 -0700 Subject: [PATCH 07/11] Update linter.yml --- .github/workflows/linter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index e8dcf7aa..6ec1cb7e 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -8,3 +8,5 @@ jobs: steps: - uses: actions/checkout@v1 - uses: ricardochaves/python-lint@v1.3.0 + with: + python-root-list: "custom_components" From f253112e393ce3f523834db8cfa5b4527619fd67 Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 09:05:15 -0700 Subject: [PATCH 08/11] Update linter.yml --- .github/workflows/linter.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 6ec1cb7e..bcf7150d 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -10,3 +10,9 @@ jobs: - uses: ricardochaves/python-lint@v1.3.0 with: python-root-list: "custom_components" + use-pylint: false + use-pycodestyle: false + use-flake8: true + use-black: true + use-mypy: true + use-isort: true From ca1d282208fe93e882d404261fb3c18695362abc Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 09:07:08 -0700 Subject: [PATCH 09/11] Update linter.yml --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index bcf7150d..67759465 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -12,7 +12,7 @@ jobs: python-root-list: "custom_components" use-pylint: false use-pycodestyle: false - use-flake8: true + use-flake8: false use-black: true use-mypy: true use-isort: true From b692bd35172dc9ba0e65c383881831a5b438b4ef Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 09:11:10 -0700 Subject: [PATCH 10/11] Add mypy check --- .github/workflows/linter.yml | 18 ------------------ .github/workflows/mypy.yml | 12 ++++++++++++ setup.cfg | 9 +++++++++ 3 files changed, 21 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/linter.yml create mode 100644 .github/workflows/mypy.yml create mode 100644 setup.cfg diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index 67759465..00000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Linting" -on: - pull_request: - -jobs: - linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - uses: ricardochaves/python-lint@v1.3.0 - with: - python-root-list: "custom_components" - use-pylint: false - use-pycodestyle: false - use-flake8: false - use-black: true - use-mypy: true - use-isort: true diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 00000000..e7097032 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,12 @@ +name: "Chekc mypy" +on: + pull_request: + +jobs: + mypy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: jpetrucciani/mypy-check@master + with: + path: "custom_components" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b4f0fe09 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,9 @@ +[mypy] +python_version = 3.8 +show_error_codes = true +ignore_errors = true +follow_imports = silent +ignore_missing_imports = true +warn_incomplete_stub = true +warn_redundant_casts = true +warn_unused_configs = true \ No newline at end of file From a736afec06d5ebea06719cf05d57a55e78de088e Mon Sep 17 00:00:00 2001 From: firstof9 Date: Mon, 22 Feb 2021 09:15:42 -0700 Subject: [PATCH 11/11] Fix typo --- .github/workflows/mypy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index e7097032..e0a6cfcb 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -1,4 +1,4 @@ -name: "Chekc mypy" +name: "Check mypy" on: pull_request: