From 39f40380ca8cb3dd2e2fa0e0391fe8f6eeac7cea Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Thu, 26 Feb 2026 17:07:49 -0500 Subject: [PATCH] Mermaid diagrams for pr governance docs This workarounds prior rendering bugs seen earlier --- generated/routes.json | 20 ++++++++-------- .../pr-automation/governance/servicenow.md | 23 +++++++++++++++++++ .../pr-automation/governance/webhook.md | 19 +++++++++++++++ src/generated/graphql.ts | 2 ++ 4 files changed, 54 insertions(+), 10 deletions(-) diff --git a/generated/routes.json b/generated/routes.json index 5da0938f..0c9fad74 100644 --- a/generated/routes.json +++ b/generated/routes.json @@ -105,7 +105,7 @@ }, "/api-reference/kubernetes/management-api-reference": { "relPath": "/api-reference/kubernetes/management-api-reference.md", - "lastmod": "2026-02-20T17:28:22.000Z" + "lastmod": "2026-02-26T20:05:46.000Z" }, "/api-reference/kubernetes/agent-api-reference": { "relPath": "/api-reference/kubernetes/agent-api-reference.md", @@ -117,7 +117,7 @@ }, "/api-reference/rest": { "relPath": "/api-reference/rest.md", - "lastmod": "2026-02-11T23:42:02.000Z" + "lastmod": "2026-02-25T03:51:15.000Z" }, "/api-reference/terraform": { "relPath": "/api-reference/terraform.md", @@ -149,11 +149,11 @@ }, "/plural-features/continuous-deployment/service-templating": { "relPath": "/plural-features/continuous-deployment/service-templating/index.md", - "lastmod": "2026-02-23T00:01:21.673Z" + "lastmod": "2026-02-26T22:30:47.369Z" }, "/plural-features/continuous-deployment/service-templating/supporting-liquid-filters": { "relPath": "/plural-features/continuous-deployment/service-templating/supporting-liquid-filters.md", - "lastmod": "2026-02-23T00:01:21.700Z" + "lastmod": "2026-02-26T22:30:47.392Z" }, "/plural-features/continuous-deployment/lua": { "relPath": "/plural-features/continuous-deployment/lua.md", @@ -289,7 +289,7 @@ }, "/plural-features/flows/preview-environments": { "relPath": "/plural-features/flows/preview-environments.md", - "lastmod": "2026-02-22T23:55:41.000Z" + "lastmod": "2026-02-23T00:07:19.000Z" }, "/plural-features/flows/mcp": { "relPath": "/plural-features/flows/mcp.md", @@ -341,19 +341,19 @@ }, "/plural-features/pr-automation/governance": { "relPath": "/plural-features/pr-automation/governance/index.md", - "lastmod": "2026-02-22T23:55:41.000Z" + "lastmod": "2026-02-23T00:07:19.000Z" }, "/plural-features/pr-automation/governance/servicenow": { "relPath": "/plural-features/pr-automation/governance/servicenow.md", - "lastmod": "2026-02-22T23:55:41.000Z" + "lastmod": "2026-02-26T22:14:59.000Z" }, "/plural-features/pr-automation/governance/webhook": { "relPath": "/plural-features/pr-automation/governance/webhook.md", - "lastmod": "2026-02-22T23:55:41.000Z" + "lastmod": "2026-02-26T22:14:59.000Z" }, "/plural-features/pr-automation/description-patterns": { "relPath": "/plural-features/pr-automation/description-patterns.md", - "lastmod": "2026-02-22T23:55:41.000Z" + "lastmod": "2026-02-23T00:07:19.000Z" }, "/plural-features/pr-automation/testing": { "relPath": "/plural-features/pr-automation/testing.md", @@ -613,7 +613,7 @@ }, "/management-api-reference": { "relPath": "/api-reference/kubernetes/management-api-reference.md", - "lastmod": "2026-02-20T17:28:22.000Z" + "lastmod": "2026-02-26T20:05:46.000Z" }, "/agent-api-reference": { "relPath": "/api-reference/kubernetes/agent-api-reference.md", diff --git a/pages/plural-features/pr-automation/governance/servicenow.md b/pages/plural-features/pr-automation/governance/servicenow.md index 56a11fa6..785ddc60 100644 --- a/pages/plural-features/pr-automation/governance/servicenow.md +++ b/pages/plural-features/pr-automation/governance/servicenow.md @@ -53,6 +53,29 @@ The ServiceNow controller will do the following once it is tied to a PR: 3. Once the PR is merged, the change is moved to `Close` state, and marked successful with reason that the pull request is merged. 4. If the PR is ever closed, the change request is moved to `Cancelled` state. +Here's a state diagram for the visually inclined as well: + +{% mermaid %} +stateDiagram-v2 + [\*] --> PRCreate : PR tied to governance + state PRCreate : PR created with governance tag + PRCreate --> ChangeCreated : Create change request in ServiceNow + state ChangeCreated : Create change via REST API, fill blanks from PR/AI if needed + ChangeCreated --> WaitingForScheduled : Change in ServiceNow + state WaitingForScheduled : Wait for change to reach Scheduled (or later) + WaitingForScheduled --> Implementing : Change is Scheduled, approve PR, move to Implement + state Implementing : Change in Implement state + Implementing --> Closed : PR merged + state Closed : Move change to Close, mark successful + PRCreate --> Cancelled : PR closed + ChangeCreated --> Cancelled : PR closed + WaitingForScheduled --> Cancelled : PR closed + Implementing --> Cancelled : PR closed + state Cancelled : Change request moved to Cancelled state + Closed --> [\*] + Cancelled --> [\*] +{% /mermaid %} + # Requiring ServiceNow Approvals before PR Approval This is acheived in the following way: diff --git a/pages/plural-features/pr-automation/governance/webhook.md b/pages/plural-features/pr-automation/governance/webhook.md index 68ab8825..90bddd42 100644 --- a/pages/plural-features/pr-automation/governance/webhook.md +++ b/pages/plural-features/pr-automation/governance/webhook.md @@ -69,6 +69,25 @@ The webhook controller will do the following once it is tied to a PR: 3. If `/v1/confirm` returns 200, the pull request is approved. 4. Once the pull request is merged or closed, a call to `POST /v1/close` is made. +Here's a state diagram for the visually inclined as well: + +{% mermaid %} +stateDiagram-v2 + [\*] --> PRCreate : PR tied to governance + state PRCreate : PR opened with governance tag + PRCreate --> OpenSent : Call POST /v1/open + state OpenSent : Response persisted for later calls + OpenSent --> WaitingForConfirm : Periodically call POST /v1/confirm with state + state WaitingForConfirm : Poll until 200 or PR merged/closed + WaitingForConfirm --> Approved : /v1/confirm returns 200 + state Approved : Pull request is approved + OpenSent --> Closed : PR merged or closed + WaitingForConfirm --> Closed : PR merged or closed + Approved --> Closed : PR merged or closed + Closed --> Cleanup : POST /v1/close with final state for cleanup + Cleanup --> [\*] +{% /mermaid %} + {% callout severity="info" %} For this to gate pull request merges appropriately, you'll need to ensure the SCM credential given to the governance controller is a required approver of the repository or at least a CODEOWNER of the files that are being changed {% /callout %} \ No newline at end of file diff --git a/src/generated/graphql.ts b/src/generated/graphql.ts index e9a3803a..339ffaaf 100644 --- a/src/generated/graphql.ts +++ b/src/generated/graphql.ts @@ -2246,6 +2246,8 @@ export type PlatformPlan = { id: Scalars['ID']['output']; insertedAt?: Maybe; lineItems?: Maybe>>; + maximumClusters?: Maybe; + maximumUsers?: Maybe; name: Scalars['String']['output']; period: PaymentPeriod; trial?: Maybe;