From bee104c2bda71064371fc64f95a987ec3188eaa0 Mon Sep 17 00:00:00 2001 From: Robbie Blaine <4052340+rblaine95@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:56:39 +0200 Subject: [PATCH 1/2] :construction_worker: Filter PR Validator Comments (#1167) * Add a Markdown Comment to identify comments left by PR validator --- .github/workflows/validate-pr.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index dea27e6a2..bb3d4caf2 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -11,6 +11,8 @@ permissions: env: # https://cbea.ms/git-commit/#limit-50 MAX_PR_TITLE_LENGTH: 50 + # Unique identifier for our bot's comments + BOT_COMMENT_IDENTIFIER: "" jobs: check-title: @@ -25,13 +27,22 @@ jobs: const title = context.payload.pull_request.title; core.setOutput('title', title); - // Get PR Comments - const comments = await github.rest.issues.listComments({ + // Get PR Comments, filtering for only this bot's comments + const allComments = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number }); - core.setOutput('comments', comments.data); + + // Filter for comments that: + // 1. Are from a Bot + // 2. Contain our unique identifier + const botComments = allComments.data.filter(comment => + comment.user.type === 'Bot' && + comment.body.includes(process.env.BOT_COMMENT_IDENTIFIER) + ); + + core.setOutput('comments', botComments); // Get JSON of valid Gitmojis const gitmojiResponse = await github.request('GET /repos/{owner}/{repo}/contents/{path}', { @@ -69,7 +80,7 @@ jobs: owner: context.repo.owner, repo: context.repo.repo, issue_number: context.issue.number, - body: `⚠️ Your PR title should start with an emoji!\n\nExample valid titles:\n- ✨ Add new feature (or :sparkles: Add new feature)\n- 🐛 Fix login bug (or :bug: Fix login bug)\n- 📝 Update documentation (or :memo: Update documentation)\n\nTo view all valid emojis, check out [gitmoji.dev](https://gitmoji.dev) for a comprehensive list of Git-friendly emojis!\n\nPlease update your PR title and try again.` + body: `${process.env.BOT_COMMENT_IDENTIFIER}\n⚠️ Your PR title should start with an emoji!\n\nExample valid titles:\n- ✨ Add new feature (or :sparkles: Add new feature)\n- 🐛 Fix login bug (or :bug: Fix login bug)\n- 📝 Update documentation (or :memo: Update documentation)\n\nTo view all valid emojis, check out [gitmoji.dev](https://gitmoji.dev) for a comprehensive list of Git-friendly emojis!\n\nPlease update your PR title and try again.` }); } @@ -108,7 +119,7 @@ jobs: comment.body.includes('Your PR title is too long!') ); - const commentBody = `⚠️ Your PR title is too long!\n\nPR titles should be no longer than ${MAX_LENGTH} characters (excluding emoji). Your title is ${titleWithoutEmoji.length} characters long.\n\nPlease update your PR title to be more concise.`; + const commentBody = `${process.env.BOT_COMMENT_IDENTIFIER}\n⚠️ Your PR title is too long!\n\nPR titles should be no longer than ${MAX_LENGTH} characters (excluding emoji). Your title is ${titleWithoutEmoji.length} characters long.\n\nPlease update your PR title to be more concise.`; if (titleWithoutEmoji.length > MAX_LENGTH) { if (!botComment) { From 5482da8d2acf4fda46b3a241aad564c15505e0a1 Mon Sep 17 00:00:00 2001 From: Robbie Blaine <4052340+rblaine95@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:47:31 +0200 Subject: [PATCH 2/2] :arrow_up: Update Local Tilt Resources (#1168) * Bump `bitnami/postgresql-ha` `14.2.33` -> `14.3.6` * Bump `bitnami/nats` `8.4.4` -> `8.4.6` * Set `podManagementPolicy` to `Parallel` --- tilt/cloudapi/Tiltfile | 2 +- tilt/cloudapi/nats/Chart.lock | 8 ++++---- tilt/cloudapi/nats/Chart.yaml | 2 +- tilt/cloudapi/nats/values.yaml | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tilt/cloudapi/Tiltfile b/tilt/cloudapi/Tiltfile index 8f01c5bd3..5db3930e4 100644 --- a/tilt/cloudapi/Tiltfile +++ b/tilt/cloudapi/Tiltfile @@ -3,7 +3,7 @@ load("ext://color", "color") load("ext://helm_resource", "helm_resource", "helm_repo") # https://github.com/bitnami/charts/tree/main/bitnami/postgresql-ha -postgres_version = "14.2.33" +postgres_version = "14.3.6" # https://github.com/rowanruseler/helm-charts/tree/main/charts/pgadmin4 pgadmin_version = "1.31.0" diff --git a/tilt/cloudapi/nats/Chart.lock b/tilt/cloudapi/nats/Chart.lock index 78ad07eb3..0e710201f 100644 --- a/tilt/cloudapi/nats/Chart.lock +++ b/tilt/cloudapi/nats/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: common repository: oci://registry-1.docker.io/bitnamicharts - version: 2.24.0 + version: 2.26.0 - name: nats repository: oci://registry-1.docker.io/bitnamicharts - version: 8.4.4 -digest: sha256:49aeb641443a36cfa0cd19a7115a0dec57b898618b94156b7ae27ad3c7ed56f0 -generated: "2024-10-09T14:30:28.401771+02:00" + version: 8.4.6 +digest: sha256:9277492904fc0aa8a6b457402089ecf0c6efe8093d7087a3a52ca14b04b81551 +generated: "2024-11-06T16:09:37.478422+02:00" diff --git a/tilt/cloudapi/nats/Chart.yaml b/tilt/cloudapi/nats/Chart.yaml index 15a4ead7b..d76d7dba7 100644 --- a/tilt/cloudapi/nats/Chart.yaml +++ b/tilt/cloudapi/nats/Chart.yaml @@ -3,7 +3,7 @@ name: nats description: A small wrapper Helm chart for bitnami/nats type: application version: "8" -appVersion: 2.10.20 +appVersion: 2.10.22 dependencies: # https://github.com/bitnami/charts/tree/main/bitnami/common diff --git a/tilt/cloudapi/nats/values.yaml b/tilt/cloudapi/nats/values.yaml index f1bf26a28..d9a3f6df6 100644 --- a/tilt/cloudapi/nats/values.yaml +++ b/tilt/cloudapi/nats/values.yaml @@ -50,6 +50,9 @@ nats: ## @param replicaCount Number of NATS nodes ## replicaCount: 1 + ## @param podManagementPolicy StatefulSet pod management policy + ## + podManagementPolicy: Parallel ## Client Authentication ## ref: https://docs.nats.io/running-a-nats-service/configuration/securing_nats/auth_intro