From 255756cbbd36db3d7af935205355e91c5337587a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:26:22 +0000 Subject: [PATCH 01/46] chore(pip-prod)(deps): bump certifi from 2024.6.2 to 2024.7.4 Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.6.2 to 2024.7.4. - [Commits](https://github.com/certifi/python-certifi/compare/2024.06.02...2024.07.04) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d4dba17..8e31445 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ astroid==3.2.2 attrs==23.2.0 autopep8==2.3.1 backoff==2.2.1 -certifi==2024.6.2 +certifi==2024.7.4 cfgv==3.4.0 charset-normalizer==3.3.2 click==8.1.7 From a89c4a55ee525feb812e503ec1d987248da79a03 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 16:12:29 +0000 Subject: [PATCH 02/46] chore(pip-prod)(deps): bump identify from 2.5.36 to 2.6.0 Bumps [identify](https://github.com/pre-commit/identify) from 2.5.36 to 2.6.0. - [Commits](https://github.com/pre-commit/identify/compare/v2.5.36...v2.6.0) --- updated-dependencies: - dependency-name: identify dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8e31445..0c2877b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,7 @@ distlib==0.3.8 filelock==3.15.4 future==1.0.0 humanfriendly==10.0 -identify==2.5.36 +identify==2.6.0 idna==3.7 iniconfig==2.0.0 lazy-object-proxy==1.10.0 From 4c14fb9bb9ad8bcd5d940e6f95110072fb6720e4 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 10 Jul 2024 07:22:27 +0000 Subject: [PATCH 03/46] fix: requirements-dev.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-ZIPP-7430899 --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5302a18..02acffb 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -4,3 +4,4 @@ isort pylint pylint-exit pytest +zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability From 0e70b9c95981ccdd1acb54feea507d6450807e38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 18:04:16 +0000 Subject: [PATCH 04/46] chore(pip-prod)(deps): bump tomlkit from 0.12.5 to 0.13.0 Bumps [tomlkit](https://github.com/sdispater/tomlkit) from 0.12.5 to 0.13.0. - [Release notes](https://github.com/sdispater/tomlkit/releases) - [Changelog](https://github.com/python-poetry/tomlkit/blob/master/CHANGELOG.md) - [Commits](https://github.com/sdispater/tomlkit/compare/0.12.5...0.13.0) --- updated-dependencies: - dependency-name: tomlkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 0c2877b..68b2fec 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,7 +37,7 @@ sentry-sdk==2.7.1 six==1.16.0 toml==0.10.2 tomli==2.0.1 -tomlkit==0.12.5 +tomlkit==0.13.0 urllib3==2.2.2 virtualenv==20.26.3 webex-bot==0.5.1 From 9714080a5d205618b1b9d355a9ad4f8ad76b527f Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Wed, 10 Jul 2024 07:35:42 +0000 Subject: [PATCH 05/46] fix: requirements.txt to reduce vulnerabilities The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-ZIPP-7430899 --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 68b2fec..8b386a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,3 +45,4 @@ webexteamssdk==1.6.1 websockets==11.0.3 wrapt==1.16.0 xmltodict==0.13.0 +zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability From e8d80582785d74de906eee9c897fa82ee9cc3a60 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 18:33:22 +0000 Subject: [PATCH 06/46] chore(pip-prod)(deps): bump sentry-sdk from 2.7.1 to 2.9.0 Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.7.1 to 2.9.0. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.7.1...2.9.0) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8b386a6..884f71f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-dotenv==1.0.1 PyYAML==6.0.1 requests==2.32.3 requests-toolbelt==1.0.0 -sentry-sdk==2.7.1 +sentry-sdk==2.9.0 six==1.16.0 toml==0.10.2 tomli==2.0.1 From 4ff8f90225b1989bae91c25339ce61be267da4af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 18:38:53 +0000 Subject: [PATCH 07/46] chore(pip-prod)(deps): bump astroid from 3.2.2 to 3.2.3 Bumps [astroid](https://github.com/pylint-dev/astroid) from 3.2.2 to 3.2.3. - [Release notes](https://github.com/pylint-dev/astroid/releases) - [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog) - [Commits](https://github.com/pylint-dev/astroid/compare/v3.2.2...v3.2.3) --- updated-dependencies: - dependency-name: astroid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 884f71f..c3b25d1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ appdirs==1.4.4 -astroid==3.2.2 +astroid==3.2.3 attrs==23.2.0 autopep8==2.3.1 backoff==2.2.1 From a808a51c6dfc5cbedb2c6d68d7b816ef20f32f7b Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 10:35:02 +0100 Subject: [PATCH 08/46] Disable auto-deploy --- .github/workflows/release.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5d728b0..bd4706d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,14 +44,14 @@ jobs: docker push ghcr.io/luketainton/roboluke-tasks:latest docker push ghcr.io/luketainton/roboluke-tasks:${{ needs.release.outputs.new_tag }} - deploy: - name: Update Portainer Deployment - runs-on: ubuntu-latest - needs: publish - steps: - - uses: fjogeleit/http-request-action@v1 - with: - url: ${{ secrets.PORTAINER_WEBHOOK_URL }} - method: POST - timeout: 60000 - preventFailureOnNoResponse: "true" + # deploy: + # name: Update Portainer Deployment + # runs-on: ubuntu-latest + # needs: publish + # steps: + # - uses: fjogeleit/http-request-action@v1 + # with: + # url: ${{ secrets.PORTAINER_WEBHOOK_URL }} + # method: POST + # timeout: 60000 + # preventFailureOnNoResponse: "true" From 3cf66ab503b9839521a270baaa6fabf110b4cb30 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Tue, 4 Jun 2024 22:30:11 +0100 Subject: [PATCH 09/46] Update build/deploy --- .github/workflows/release.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd4706d..10e74be 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,10 @@ on: push: branches: [main] +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + jobs: release: name: Release @@ -29,20 +33,23 @@ jobs: name: GitHub Container Registry runs-on: ubuntu-latest needs: release + permissions: + contents: read + packages: write steps: - uses: actions/checkout@v4 - name: Login to GitHub Container Registry - run: echo ${{ secrets.GHCR_ACCESS_TOKEN }} | docker login ghcr.io -u luketainton --password-stdin + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin - name: Build image for GitHub Package Registry run: | docker build . --file Dockerfile \ --build-arg "version=${{ needs.release.outputs.new_tag }}" \ - --tag ghcr.io/luketainton/roboluke-tasks:${{ needs.release.outputs.new_tag }} \ - --tag ghcr.io/luketainton/roboluke-tasks:latest + --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release.outputs.new_tag }} \ + --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - name: Push image to GitHub Package Registry run: | - docker push ghcr.io/luketainton/roboluke-tasks:latest - docker push ghcr.io/luketainton/roboluke-tasks:${{ needs.release.outputs.new_tag }} + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest + docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release.outputs.new_tag }} # deploy: # name: Update Portainer Deployment From 43696f16e18455fa52a1a0b315aaffcf23e79acd Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 10:47:21 +0100 Subject: [PATCH 10/46] Revamp GH Actions to eliminate next->main --- .github/{workflows => }/release.yml | 0 .github/workflows-old | 0 .github/workflows/create_release.yml | 29 +++++++++++++++++ .github/workflows/docker_publish.yml | 48 ++++++++++++++++++++++++++++ 4 files changed, 77 insertions(+) rename .github/{workflows => }/release.yml (100%) create mode 100644 .github/workflows-old create mode 100644 .github/workflows/create_release.yml create mode 100644 .github/workflows/docker_publish.yml diff --git a/.github/workflows/release.yml b/.github/release.yml similarity index 100% rename from .github/workflows/release.yml rename to .github/release.yml diff --git a/.github/workflows-old b/.github/workflows-old new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 0000000..6273802 --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,29 @@ +name: Create Release +on: + workflow_dispatch: + schedule: + - cron: "0 9 * * *" + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + outputs: + new_tag: ${{ steps.tag_version.outputs.new_tag }} + steps: + - uses: actions/checkout@v4 + + - name: Bump version and push tag + id: tag_version + uses: mathieudutour/github-tag-action@v6.2 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + default_bump: minor + + - name: Create a GitHub release + uses: ncipollo/release-action@v1 + with: + tag: ${{ steps.tag_version.outputs.new_tag }} + name: ${{ steps.tag_version.outputs.new_tag }} + body: ${{ steps.tag_version.outputs.changelog }} + generateReleaseNotes: true diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml new file mode 100644 index 0000000..32fe6e8 --- /dev/null +++ b/.github/workflows/docker_publish.yml @@ -0,0 +1,48 @@ +name: Publish Docker Image + +on: + release: + types: [published] + +jobs: + publish: + name: Publish Docker image + runs-on: ubuntu-latest + permissions: + packages: write + contents: read + attestations: write + id-token: write + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + with: + images: | + ghcr.io/${{ github.repository }} + + - name: Build and push Docker image + id: push + uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true From 3f318d6d7084150f93e32b7083ddd8e8ae7ddf4a Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 10:50:48 +0100 Subject: [PATCH 11/46] Migrate Renovate from next to main --- .github/renovate.json | 2 +- .github/workflows-old | 0 .github/{ => workflows-old}/release.yml | 0 3 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .github/workflows-old rename .github/{ => workflows-old}/release.yml (100%) diff --git a/.github/renovate.json b/.github/renovate.json index 67e7daa..4e3342a 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -5,7 +5,7 @@ ":semanticCommitTypeAll(fix)" ], "baseBranches": [ - "next" + "main" ], "platformCommit": true, "dependencyDashboardAutoclose": true, diff --git a/.github/workflows-old b/.github/workflows-old deleted file mode 100644 index e69de29..0000000 diff --git a/.github/release.yml b/.github/workflows-old/release.yml similarity index 100% rename from .github/release.yml rename to .github/workflows-old/release.yml From 014085f69309b2b1be15a0cdb61f3404cda4c4b4 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:02:18 +0100 Subject: [PATCH 12/46] Fix publish workflow --- .github/workflows/docker_publish.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 32fe6e8..b0e5038 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -1,8 +1,9 @@ name: Publish Docker Image on: + workflow_dispatch: release: - types: [published] + types: [published, created] jobs: publish: @@ -16,6 +17,8 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.name }} - name: Log in to GitHub Container Registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 From eb4f19ee3f86b9368f50141d95ff6b8dc73adfab Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:05:56 +0100 Subject: [PATCH 13/46] Fix Docker attestation --- .github/workflows/docker_publish.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index b0e5038..553435b 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -32,7 +32,8 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: | - ghcr.io/${{ github.repository }} + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ github.event.release.name }} - name: Build and push Docker image id: push @@ -46,6 +47,6 @@ jobs: - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + subject-name: ghcr.io/${{ github.repository }}:${{ github.event.release.name }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true From 6674fccb6a3a88740bd35822b545e3d2bb7d4039 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:10:21 +0100 Subject: [PATCH 14/46] Fix Docker deployment --- .github/workflows/docker_publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 553435b..cc62808 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -41,7 +41,9 @@ jobs: with: context: . push: true - tags: ${{ steps.meta.outputs.tags }} + tags: | + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ github.event.release.name }} labels: ${{ steps.meta.outputs.labels }} - name: Generate artifact attestation From b22363a87fd540cabef3ebdf24e9c5837d6686e9 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:18:27 +0100 Subject: [PATCH 15/46] Trigger Docker flow from Release flow --- .github/workflows/create_release.yml | 5 +++++ .github/workflows/docker_publish.yml | 16 +++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 6273802..9e92708 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -27,3 +27,8 @@ jobs: name: ${{ steps.tag_version.outputs.new_tag }} body: ${{ steps.tag_version.outputs.changelog }} generateReleaseNotes: true + + - name: Create Docker Image + uses: luketainton/roboluke-tasks/.github/workflows/docker_publish.yml@main + with: + release: ${{ steps.tag_version.outputs.new_tag }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index cc62808..d0d36f2 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -1,9 +1,11 @@ name: Publish Docker Image on: - workflow_dispatch: - release: - types: [published, created] + workflow_call: + inputs: + release: + required: true + type: string jobs: publish: @@ -18,7 +20,7 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 with: - ref: ${{ github.event.release.name }} + ref: ${{ inputs.release }} - name: Log in to GitHub Container Registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 @@ -33,7 +35,7 @@ jobs: with: images: | ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ github.event.release.name }} + ghcr.io/${{ github.repository }}:${{ inputs.release }} - name: Build and push Docker image id: push @@ -43,12 +45,12 @@ jobs: push: true tags: | ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ github.event.release.name }} + ghcr.io/${{ github.repository }}:${{ inputs.release }} labels: ${{ steps.meta.outputs.labels }} - name: Generate artifact attestation uses: actions/attest-build-provenance@v1 with: - subject-name: ghcr.io/${{ github.repository }}:${{ github.event.release.name }} + subject-name: ghcr.io/${{ github.repository }}:${{ inputs.release }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true From cfdc7311d2413915b57d16306bed412224b4415a Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:21:37 +0100 Subject: [PATCH 16/46] Fix create_docker --- .github/workflows/create_release.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 9e92708..559427b 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -28,7 +28,12 @@ jobs: body: ${{ steps.tag_version.outputs.changelog }} generateReleaseNotes: true + create_docker: + name: Create Docker Image + runs-on: ubuntu-latest + needs: create_release + steps: - name: Create Docker Image uses: luketainton/roboluke-tasks/.github/workflows/docker_publish.yml@main with: - release: ${{ steps.tag_version.outputs.new_tag }} + release: ${{ needs.create_release.outputs.new_tag }} From 2cf102db5d841862ddccbe6725d758c31c088e31 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:22:33 +0100 Subject: [PATCH 17/46] Fix create_docker --- .github/workflows/create_release.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index 559427b..0c95b1b 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -30,10 +30,7 @@ jobs: create_docker: name: Create Docker Image - runs-on: ubuntu-latest needs: create_release - steps: - - name: Create Docker Image - uses: luketainton/roboluke-tasks/.github/workflows/docker_publish.yml@main - with: - release: ${{ needs.create_release.outputs.new_tag }} + uses: luketainton/roboluke-tasks/.github/workflows/docker_publish.yml@main + with: + release: ${{ needs.create_release.outputs.new_tag }} From 6832c03f8d7d7b5e8efd891b8cc24633c8219896 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:29:24 +0100 Subject: [PATCH 18/46] Fix auto Docker tag creation --- .github/workflows/docker_publish.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index d0d36f2..6546d9b 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -34,8 +34,10 @@ jobs: uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: images: | - ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ inputs.release }} + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=tag + type=semver,pattern=v{{version}} - name: Build and push Docker image id: push From 6e4d78cfcd486339ff88c40f3fba15f164457a32 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:33:09 +0100 Subject: [PATCH 19/46] Fix auto Docker tag creation --- .github/workflows/docker_publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 6546d9b..8102e8d 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -36,8 +36,7 @@ jobs: images: | ghcr.io/${{ github.repository }} tags: | - type=ref,event=tag - type=semver,pattern=v{{version}} + type=semver,pattern=v{{version}},value=${{ inputs.release }} - name: Build and push Docker image id: push From a3143790918704ac01b847ea1fee0c6498e2feea Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:36:49 +0100 Subject: [PATCH 20/46] Fix auto Docker tag creation --- .github/workflows/docker_publish.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 8102e8d..780f781 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -44,14 +44,15 @@ jobs: with: context: . push: true + provenance: mode=max + labels: ${{ steps.meta.outputs.labels }} tags: | ghcr.io/${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${{ inputs.release }} - labels: ${{ steps.meta.outputs.labels }} - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v1 - with: - subject-name: ghcr.io/${{ github.repository }}:${{ inputs.release }} - subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true + # - name: Generate artifact attestation + # uses: actions/attest-build-provenance@v1 + # with: + # subject-name: ghcr.io/${{ github.repository }}:${{ inputs.release }} + # subject-digest: ${{ steps.push.outputs.digest }} + # push-to-registry: true From 6985f4dbe850cf7b049b9383774312ead71c3401 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:39:59 +0100 Subject: [PATCH 21/46] Switch to new Docker driver --- .github/workflows/docker_publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 780f781..8ea2e0f 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -22,6 +22,9 @@ jobs: with: ref: ${{ inputs.release }} + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: Log in to GitHub Container Registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: From 50d8f81c630116b6d247c6fbdf57db1680c95c7e Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 11:48:27 +0100 Subject: [PATCH 22/46] Fix attestation --- .github/workflows/docker_publish.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 8ea2e0f..087a828 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -47,15 +47,15 @@ jobs: with: context: . push: true - provenance: mode=max + # provenance: mode=max labels: ${{ steps.meta.outputs.labels }} tags: | ghcr.io/${{ github.repository }}:latest ghcr.io/${{ github.repository }}:${{ inputs.release }} - # - name: Generate artifact attestation - # uses: actions/attest-build-provenance@v1 - # with: - # subject-name: ghcr.io/${{ github.repository }}:${{ inputs.release }} - # subject-digest: ${{ steps.push.outputs.digest }} - # push-to-registry: true + - name: Generate artifact attestation + uses: actions/attest-build-provenance@v1 + with: + subject-name: ghcr.io/${{ github.repository }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true From d9b815b664da87fa18398414a3a9e9d7a44d38cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 10:34:15 +0000 Subject: [PATCH 23/46] chore(actions)(deps): bump docker/metadata-action Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 to a64d0487d7069df33b279515d35d60fa80e2ea62. - [Release notes](https://github.com/docker/metadata-action/releases) - [Commits](https://github.com/docker/metadata-action/compare/9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7...a64d0487d7069df33b279515d35d60fa80e2ea62) --- updated-dependencies: - dependency-name: docker/metadata-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/docker_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 087a828..7787a69 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -34,7 +34,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 + uses: docker/metadata-action@a64d0487d7069df33b279515d35d60fa80e2ea62 with: images: | ghcr.io/${{ github.repository }} From c60494ce60e44a3e9edb29d310ff62b0eddc3dbb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 10:38:19 +0000 Subject: [PATCH 24/46] chore(actions)(deps): bump docker/login-action Bumps [docker/login-action](https://github.com/docker/login-action) from 65b78e6e13532edd9afa3aa52ac7964289d1a9c1 to 0d4c9c5ea7693da7b068278f7b52bda2a190a446. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/65b78e6e13532edd9afa3aa52ac7964289d1a9c1...0d4c9c5ea7693da7b068278f7b52bda2a190a446) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- .github/workflows/docker_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 7787a69..2ac81be 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -26,7 +26,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Log in to GitHub Container Registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 + uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 with: registry: ghcr.io username: ${{ github.actor }} From f3b4b61f450711db220951fe473e31371bfad09f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 10:38:34 +0000 Subject: [PATCH 25/46] chore(actions)(deps): bump docker/build-push-action from 4.0.0 to 6.3.0 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.0.0 to 6.3.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/3b5e8027fcad23fda98b2e3ac259d8d67585f671...1a162644f9a7e87d8f4b053101d1d9a712edc18c) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/docker_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 2ac81be..7b02506 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -43,7 +43,7 @@ jobs: - name: Build and push Docker image id: push - uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671 + uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c with: context: . push: true From 82bcffc49890ccd63988566278f63fdfe3857330 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sat, 13 Jul 2024 12:25:09 +0100 Subject: [PATCH 26/46] Move to shared workflows --- .github/workflows/create_release.yml | 36 ---------------- .github/workflows/docker_publish.yml | 61 ---------------------------- .github/workflows/release.yml | 17 ++++++++ 3 files changed, 17 insertions(+), 97 deletions(-) delete mode 100644 .github/workflows/create_release.yml delete mode 100644 .github/workflows/docker_publish.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml deleted file mode 100644 index 0c95b1b..0000000 --- a/.github/workflows/create_release.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Create Release -on: - workflow_dispatch: - schedule: - - cron: "0 9 * * *" - -jobs: - create_release: - name: Create Release - runs-on: ubuntu-latest - outputs: - new_tag: ${{ steps.tag_version.outputs.new_tag }} - steps: - - uses: actions/checkout@v4 - - - name: Bump version and push tag - id: tag_version - uses: mathieudutour/github-tag-action@v6.2 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - default_bump: minor - - - name: Create a GitHub release - uses: ncipollo/release-action@v1 - with: - tag: ${{ steps.tag_version.outputs.new_tag }} - name: ${{ steps.tag_version.outputs.new_tag }} - body: ${{ steps.tag_version.outputs.changelog }} - generateReleaseNotes: true - - create_docker: - name: Create Docker Image - needs: create_release - uses: luketainton/roboluke-tasks/.github/workflows/docker_publish.yml@main - with: - release: ${{ needs.create_release.outputs.new_tag }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml deleted file mode 100644 index 7b02506..0000000 --- a/.github/workflows/docker_publish.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Publish Docker Image - -on: - workflow_call: - inputs: - release: - required: true - type: string - -jobs: - publish: - name: Publish Docker image - runs-on: ubuntu-latest - permissions: - packages: write - contents: read - attestations: write - id-token: write - steps: - - name: Check out the repo - uses: actions/checkout@v4 - with: - ref: ${{ inputs.release }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to GitHub Container Registry - uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@a64d0487d7069df33b279515d35d60fa80e2ea62 - with: - images: | - ghcr.io/${{ github.repository }} - tags: | - type=semver,pattern=v{{version}},value=${{ inputs.release }} - - - name: Build and push Docker image - id: push - uses: docker/build-push-action@1a162644f9a7e87d8f4b053101d1d9a712edc18c - with: - context: . - push: true - # provenance: mode=max - labels: ${{ steps.meta.outputs.labels }} - tags: | - ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ inputs.release }} - - - name: Generate artifact attestation - uses: actions/attest-build-provenance@v1 - with: - subject-name: ghcr.io/${{ github.repository }} - subject-digest: ${{ steps.push.outputs.digest }} - push-to-registry: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dc8e260 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release +on: + workflow_dispatch: + schedule: + - cron: "0 9 * * *" + +jobs: + create_release: + name: Create Release + uses: luketainton/gha-workflows/.github/workflows/create-release.yml@main + + create_docker: + name: Create Docker Image + needs: create_release + uses: luketainton/gha-workflows/.github/workflows/build-push-attest-docker.yml@main + with: + release: ${{ needs.create_release.outputs.release_name }} From 69f5dfaf20bb25d92cd7c901e5d87585f2cb9577 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:25:48 +0000 Subject: [PATCH 27/46] chore(pip-prod)(deps): bump sentry-sdk from 2.9.0 to 2.10.0 Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.9.0 to 2.10.0. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.9.0...2.10.0) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c3b25d1..d312b2a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-dotenv==1.0.1 PyYAML==6.0.1 requests==2.32.3 requests-toolbelt==1.0.0 -sentry-sdk==2.9.0 +sentry-sdk==2.10.0 six==1.16.0 toml==0.10.2 tomli==2.0.1 From 4bd87538ddafe4c2677b4c5dddbb71673160d0f2 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Tue, 16 Jul 2024 19:08:22 +0100 Subject: [PATCH 28/46] Stop release flow if no new release --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc8e260..e84d6e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ jobs: create_docker: name: Create Docker Image needs: create_release + if: ${{ needs.create_release.outputs.success == 'true' }} uses: luketainton/gha-workflows/.github/workflows/build-push-attest-docker.yml@main with: release: ${{ needs.create_release.outputs.release_name }} From 437c9d87d11e78cca272cf0b4faea886d13da5bc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:38:40 +0000 Subject: [PATCH 29/46] chore(pip-prod)(deps): bump astroid from 3.2.3 to 3.2.4 Bumps [astroid](https://github.com/pylint-dev/astroid) from 3.2.3 to 3.2.4. - [Release notes](https://github.com/pylint-dev/astroid/releases) - [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog) - [Commits](https://github.com/pylint-dev/astroid/compare/v3.2.3...v3.2.4) --- updated-dependencies: - dependency-name: astroid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d312b2a..40fb16a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ appdirs==1.4.4 -astroid==3.2.3 +astroid==3.2.4 attrs==23.2.0 autopep8==2.3.1 backoff==2.2.1 From 59e491671172db97317efedb15fbff90010f0c15 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:38:34 +0000 Subject: [PATCH 30/46] chore(pip-prod)(deps): bump sentry-sdk from 2.10.0 to 2.11.0 Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.10.0 to 2.11.0. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.10.0...2.11.0) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 40fb16a..ec7535b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-dotenv==1.0.1 PyYAML==6.0.1 requests==2.32.3 requests-toolbelt==1.0.0 -sentry-sdk==2.10.0 +sentry-sdk==2.11.0 six==1.16.0 toml==0.10.2 tomli==2.0.1 From 9ad8fae9ac60661e5c63064a8a4015479ef84ce2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 16:27:53 +0000 Subject: [PATCH 31/46] chore(pip-prod)(deps): bump sentry-sdk from 2.11.0 to 2.12.0 Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.11.0 to 2.12.0. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.11.0...2.12.0) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ec7535b..1b9a2b4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-dotenv==1.0.1 PyYAML==6.0.1 requests==2.32.3 requests-toolbelt==1.0.0 -sentry-sdk==2.11.0 +sentry-sdk==2.12.0 six==1.16.0 toml==0.10.2 tomli==2.0.1 From 4994aa301d0c00dbcbabd3b8a926111883c15b74 Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Wed, 31 Jul 2024 22:05:13 +0100 Subject: [PATCH 32/46] Release once per week instead of daily --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e84d6e3..6012ad1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: workflow_dispatch: schedule: - - cron: "0 9 * * *" + - cron: "0 9 * * 0" jobs: create_release: From 0188d8e43debdcf4a99884813e8fe8b4eeec36dc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 16:11:00 +0000 Subject: [PATCH 33/46] chore(pip-prod)(deps): bump pyjwt from 2.8.0 to 2.9.0 Bumps [pyjwt](https://github.com/jpadilla/pyjwt) from 2.8.0 to 2.9.0. - [Release notes](https://github.com/jpadilla/pyjwt/releases) - [Changelog](https://github.com/jpadilla/pyjwt/blob/master/CHANGELOG.rst) - [Commits](https://github.com/jpadilla/pyjwt/compare/2.8.0...2.9.0) --- updated-dependencies: - dependency-name: pyjwt dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1b9a2b4..025808e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,7 +26,7 @@ platformdirs==4.2.2 pluggy==1.5.0 py==1.11.0 pycodestyle==2.12.0 -PyJWT==2.8.0 +PyJWT==2.9.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 From 6c1c5edf0417b3b51c42cb9dd4c53f49c13856ff Mon Sep 17 00:00:00 2001 From: Luke Tainton Date: Sun, 4 Aug 2024 18:47:43 +0100 Subject: [PATCH 34/46] chore: add pre-commit --- .env.default | 2 +- .github/CODEOWNERS | 2 +- .github/renovate.json | 34 +++++++++++------------ .pre-commit-config.yaml | 60 +++++++++++++++++++++++++++++++++++++++++ app/utils/datetime.py | 12 ++++----- app/utils/n8n.py | 12 ++++----- docker-compose.yml | 2 +- 7 files changed, 92 insertions(+), 32 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.env.default b/.env.default index f28208d..0c62acf 100644 --- a/.env.default +++ b/.env.default @@ -5,4 +5,4 @@ ADMIN_EMAIL="" ADMIN_FIRST_NAME="" BOT_NAME="" N8N_WEBHOOK_URL="" -WEBEX_API_KEY="" \ No newline at end of file +WEBEX_API_KEY="" diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0d35f6e..55e6153 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @luketainton \ No newline at end of file +* @luketainton diff --git a/.github/renovate.json b/.github/renovate.json index 4e3342a..979ffa0 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,47 +1,47 @@ { + "assignAutomerge": true, + "assigneesFromCodeOwners": true, + "baseBranches": [ + "main" + ], + "dependencyDashboardAutoclose": true, "extends": [ "config:base", ":semanticCommits", ":semanticCommitTypeAll(fix)" ], - "baseBranches": [ - "main" - ], - "platformCommit": true, - "dependencyDashboardAutoclose": true, - "assignAutomerge": true, - "assigneesFromCodeOwners": true, - "rebaseWhen": "behind-base-branch", - "rollbackPrs": true, "labels": [ "dependencies" ], "packageRules": [ { + "labels": [ + "linting" + ], "matchPackagePatterns": [ "black", "pylint" - ], - "labels": [ - "linting" ] }, { + "labels": [ + "unit-tests" + ], "matchPackagePatterns": [ "coverage", "pytest" - ], - "labels": [ - "unit-tests" ] } ], + "platformCommit": true, + "rebaseWhen": "behind-base-branch", + "rollbackPrs": true, "vulnerabilityAlerts": { + "commitMessagePrefix": "[SECURITY] ", "enabled": true, "labels": [ "security" ], - "commitMessagePrefix": "[SECURITY] ", "prCreation": "immediate" } -} \ No newline at end of file +} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..9298bce --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,60 @@ +fail_fast: false + +minimum_pre_commit_version: 3.8.0 + +default_install_hook_types: [pre-commit, commit-msg] + +default_language_version: + python: python3.11 + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.6.0 + hooks: + - id: trailing-whitespace + - id: mixed-line-ending + - id: end-of-file-fixer + - id: requirements-txt-fixer + - id: check-yaml + - id: check-added-large-files + - id: check-ast + - id: check-docstring-first + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-xml + - id: detect-private-key + - id: no-commit-to-branch + - id: requirements-txt-fixer + - id: name-tests-test + args: [--pytest-test-first] + - id: pretty-format-json + args: [--autofix] + + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.5.6 + hooks: + - id: ruff-format # Run the formatter. + - id: ruff # Run the linter. + args: [--fix] + + - repo: https://github.com/pycqa/isort + rev: 5.13.2 + hooks: + - id: isort + + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: python-use-type-annotations + + - repo: https://github.com/asottile/pyupgrade + rev: v3.17.0 + hooks: + - id: pyupgrade + + - repo: https://github.com/compilerla/conventional-pre-commit + rev: v3.4.0 + hooks: + - id: conventional-pre-commit + stages: [commit-msg] diff --git a/app/utils/datetime.py b/app/utils/datetime.py index 472371c..f645d3b 100644 --- a/app/utils/datetime.py +++ b/app/utils/datetime.py @@ -1,18 +1,18 @@ #!/usr/bin/env python3 -from zoneinfo import ZoneInfo - from datetime import datetime +from zoneinfo import ZoneInfo def timestamp_to_date(timestamp: int) -> str: """Convert timestamp to date. - + Args: timestamp (int): Timestamp to convert. - + Returns: str: Date in the format YYYY-MM-DD. """ - return datetime.fromtimestamp(timestamp=timestamp, tz=ZoneInfo("UTC")).strftime("%Y-%m-%d") - + return datetime.fromtimestamp(timestamp=timestamp, tz=ZoneInfo("UTC")).strftime( + "%Y-%m-%d" + ) diff --git a/app/utils/n8n.py b/app/utils/n8n.py index 4c0f84b..6940174 100644 --- a/app/utils/n8n.py +++ b/app/utils/n8n.py @@ -6,10 +6,10 @@ from app.utils.config import config def __n8n_post(data: dict) -> bool: """Post data to N8N webhook URL. - + Args: data (dict): Data to post to webhook URL. - + Returns: bool: True if successful, else False. """ @@ -26,13 +26,13 @@ def __n8n_post(data: dict) -> bool: def submit_task(summary, description, completion_date, requestor) -> bool: """Submit task to N8N webhook URL. - + Args: summary (str): Summary of task. description (str): Description of task. completion_date (str): Completion date of task. requestor (str): Requestor of task. - + Returns: bool: True if successful, else False. """ @@ -49,10 +49,10 @@ def submit_task(summary, description, completion_date, requestor) -> bool: def get_tasks(requestor) -> bool: """Get tasks from N8N webhook URL. - + Args: requestor (str): Requestor of tasks. - + Returns: bool: True if successful, else False. """ diff --git a/docker-compose.yml b/docker-compose.yml index ee034ed..dab1a66 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,4 +7,4 @@ services: dockerfile: Dockerfile restart: unless-stopped env_file: .env -... \ No newline at end of file +... From d3ba06fa0bd8eb5b5c6a9515266230b69a6736d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 16:57:51 +0000 Subject: [PATCH 35/46] chore(pip-prod)(deps): bump attrs from 23.2.0 to 24.1.0 Bumps [attrs](https://github.com/sponsors/hynek) from 23.2.0 to 24.1.0. - [Commits](https://github.com/sponsors/hynek/commits) --- updated-dependencies: - dependency-name: attrs dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 025808e..ac598fd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ appdirs==1.4.4 astroid==3.2.4 -attrs==23.2.0 +attrs==24.1.0 autopep8==2.3.1 backoff==2.2.1 certifi==2024.7.4 From 9e9266ed940385b1273689c2d8a850ede641e6b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 18:19:27 +0000 Subject: [PATCH 36/46] chore(pip-prod)(deps): bump pycodestyle from 2.12.0 to 2.12.1 Bumps [pycodestyle](https://github.com/PyCQA/pycodestyle) from 2.12.0 to 2.12.1. - [Release notes](https://github.com/PyCQA/pycodestyle/releases) - [Changelog](https://github.com/PyCQA/pycodestyle/blob/main/CHANGES.txt) - [Commits](https://github.com/PyCQA/pycodestyle/compare/2.12.0...2.12.1) --- updated-dependencies: - dependency-name: pycodestyle dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ac598fd..486453e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,7 @@ pathspec==0.12.1 platformdirs==4.2.2 pluggy==1.5.0 py==1.11.0 -pycodestyle==2.12.0 +pycodestyle==2.12.1 PyJWT==2.9.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 From f198798a89aa98c0e2a42d7db9aaea8e36a41932 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 21:03:24 +0000 Subject: [PATCH 37/46] chore(pip-prod)(deps): bump astroid from 3.2.4 to 3.3.0 Bumps [astroid](https://github.com/pylint-dev/astroid) from 3.2.4 to 3.3.0. - [Release notes](https://github.com/pylint-dev/astroid/releases) - [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog) - [Commits](https://github.com/pylint-dev/astroid/compare/v3.2.4...v3.3.0) --- updated-dependencies: - dependency-name: astroid dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 486453e..d06c1cc 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ appdirs==1.4.4 -astroid==3.2.4 +astroid==3.3.0 attrs==24.1.0 autopep8==2.3.1 backoff==2.2.1 From 413560e6e2d3a1b663ee5555e9da0b1359de0a0b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:17:14 +0000 Subject: [PATCH 38/46] chore(pip-prod)(deps): bump astroid from 3.3.0 to 3.3.1 Bumps [astroid](https://github.com/pylint-dev/astroid) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/pylint-dev/astroid/releases) - [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog) - [Commits](https://github.com/pylint-dev/astroid/compare/v3.3.0...v3.3.1) --- updated-dependencies: - dependency-name: astroid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index d06c1cc..7d66d90 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ appdirs==1.4.4 -astroid==3.3.0 +astroid==3.3.1 attrs==24.1.0 autopep8==2.3.1 backoff==2.2.1 From 5cc5aa37180fd9b9b602ae280b7d9187d66af3d1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Aug 2024 16:32:52 +0000 Subject: [PATCH 39/46] chore(pip-prod)(deps): bump attrs from 24.1.0 to 24.2.0 Bumps [attrs](https://github.com/sponsors/hynek) from 24.1.0 to 24.2.0. - [Commits](https://github.com/sponsors/hynek/commits) --- updated-dependencies: - dependency-name: attrs dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7d66d90..205be1f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ appdirs==1.4.4 astroid==3.3.1 -attrs==24.1.0 +attrs==24.2.0 autopep8==2.3.1 backoff==2.2.1 certifi==2024.7.4 From 95de56be421a3a4a109f1ee7dc00ac44b79d6f79 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Aug 2024 16:58:52 +0000 Subject: [PATCH 40/46] chore(pip-prod)(deps): bump pyyaml from 6.0.1 to 6.0.2 Bumps [pyyaml](https://github.com/yaml/pyyaml) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/yaml/pyyaml/releases) - [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES) - [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2) --- updated-dependencies: - dependency-name: pyyaml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 205be1f..10a620e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -30,7 +30,7 @@ PyJWT==2.9.0 pyparsing==3.1.2 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 -PyYAML==6.0.1 +PyYAML==6.0.2 requests==2.32.3 requests-toolbelt==1.0.0 sentry-sdk==2.12.0 From 0e425a35e64732559ca8c8454dc80fcbf4ed066e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:08:07 +0000 Subject: [PATCH 41/46] chore(pip-prod)(deps): bump astroid from 3.3.1 to 3.3.2 Bumps [astroid](https://github.com/pylint-dev/astroid) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/pylint-dev/astroid/releases) - [Changelog](https://github.com/pylint-dev/astroid/blob/main/ChangeLog) - [Commits](https://github.com/pylint-dev/astroid/compare/v3.3.1...v3.3.2) --- updated-dependencies: - dependency-name: astroid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 10a620e..ca6ffbf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ appdirs==1.4.4 -astroid==3.3.1 +astroid==3.3.2 attrs==24.2.0 autopep8==2.3.1 backoff==2.2.1 From 567906e574b1b205e4ea5f51e2c3cfcaca4c14bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:17:41 +0000 Subject: [PATCH 42/46] chore(pip-prod)(deps): bump sentry-sdk from 2.12.0 to 2.13.0 Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 2.12.0 to 2.13.0. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/2.12.0...2.13.0) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index ca6ffbf..4a571fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -33,7 +33,7 @@ python-dotenv==1.0.1 PyYAML==6.0.2 requests==2.32.3 requests-toolbelt==1.0.0 -sentry-sdk==2.12.0 +sentry-sdk==2.13.0 six==1.16.0 toml==0.10.2 tomli==2.0.1 From 78af3313bde555453c0ee9e467f7a2df6506a5fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:55:38 +0000 Subject: [PATCH 43/46] chore(pip-prod)(deps): bump tomlkit from 0.13.0 to 0.13.2 Bumps [tomlkit](https://github.com/sdispater/tomlkit) from 0.13.0 to 0.13.2. - [Release notes](https://github.com/sdispater/tomlkit/releases) - [Changelog](https://github.com/python-poetry/tomlkit/blob/master/CHANGELOG.md) - [Commits](https://github.com/sdispater/tomlkit/compare/0.13.0...0.13.2) --- updated-dependencies: - dependency-name: tomlkit dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4a571fa..9a327c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,7 +37,7 @@ sentry-sdk==2.13.0 six==1.16.0 toml==0.10.2 tomli==2.0.1 -tomlkit==0.13.0 +tomlkit==0.13.2 urllib3==2.2.2 virtualenv==20.26.3 webex-bot==0.5.1 From c7128daf73d9cd2a77cfb45836062cda70732f73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 16:31:34 +0000 Subject: [PATCH 44/46] chore(pip-prod)(deps): bump webex-bot from 0.5.1 to 0.5.2 Bumps [webex-bot](https://github.com/fbradyirl/webex_bot) from 0.5.1 to 0.5.2. - [Release notes](https://github.com/fbradyirl/webex_bot/releases) - [Commits](https://github.com/fbradyirl/webex_bot/compare/v0.5.1...v0.5.2) --- updated-dependencies: - dependency-name: webex-bot dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 9a327c4..8a18486 100644 --- a/requirements.txt +++ b/requirements.txt @@ -40,7 +40,7 @@ tomli==2.0.1 tomlkit==0.13.2 urllib3==2.2.2 virtualenv==20.26.3 -webex-bot==0.5.1 +webex-bot==0.5.2 webexteamssdk==1.6.1 websockets==11.0.3 wrapt==1.16.0 From 4d4514dd954eb9ba9225463043bd4279193c52cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 23 Aug 2024 16:46:34 +0000 Subject: [PATCH 45/46] chore(pip-prod)(deps): bump idna from 3.7 to 3.8 Bumps [idna](https://github.com/kjd/idna) from 3.7 to 3.8. - [Release notes](https://github.com/kjd/idna/releases) - [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst) - [Commits](https://github.com/kjd/idna/compare/v3.7...v3.8) --- updated-dependencies: - dependency-name: idna dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 8a18486..4a53166 100644 --- a/requirements.txt +++ b/requirements.txt @@ -14,7 +14,7 @@ filelock==3.15.4 future==1.0.0 humanfriendly==10.0 identify==2.6.0 -idna==3.7 +idna==3.8 iniconfig==2.0.0 lazy-object-proxy==1.10.0 mccabe==0.7.0 From 56f1cb924e30952db34e86a75d2e0631f8968b23 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:31:25 +0000 Subject: [PATCH 46/46] chore(pip-prod)(deps): bump pyparsing from 3.1.2 to 3.1.4 Bumps [pyparsing](https://github.com/pyparsing/pyparsing) from 3.1.2 to 3.1.4. - [Release notes](https://github.com/pyparsing/pyparsing/releases) - [Changelog](https://github.com/pyparsing/pyparsing/blob/master/CHANGES) - [Commits](https://github.com/pyparsing/pyparsing/compare/pyparsing_3.1.2...3.1.4) --- updated-dependencies: - dependency-name: pyparsing dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4a53166..7e1dda8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -27,7 +27,7 @@ pluggy==1.5.0 py==1.11.0 pycodestyle==2.12.1 PyJWT==2.9.0 -pyparsing==3.1.2 +pyparsing==3.1.4 python-dateutil==2.9.0.post0 python-dotenv==1.0.1 PyYAML==6.0.2