From d813facd0c8add7f4caba48d3bc2d4dd7a03a1f0 Mon Sep 17 00:00:00 2001 From: Johannes Nicolai Date: Mon, 17 Jan 2022 10:50:51 +0100 Subject: [PATCH 1/3] How to use /ps-attach command * adding info how to use /ps-attach command --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 75657c4..c80ecf6 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,8 @@ The workflows covered so far have been all triggered as manual GitHub Action job You can also create a database branch and deploy request based on an [already existing Pull Request](https://github.com/jonico/pscale-cli-helper-scripts/pull/2) using `/ps-create`: ![image](https://user-images.githubusercontent.com/1872314/143734380-132bdd39-b4bc-4ec0-b1e8-79d31748542c.png) +If the PlanetScale deploy request or database branch and your pull request both exist already, you can use the `/ps-attach` command, followed by the PlanetScale URL to your branch/DR: + If you like to refresh the schema information of your branch or add additional DDL statements, use `/ps-update`: ![image](https://user-images.githubusercontent.com/1872314/144099735-8e023ecf-31ef-4129-82d0-3aa91d5c9777.png) From 64eb109ea974c7b7b3ab87103b166e96bdcf4260 Mon Sep 17 00:00:00 2001 From: jonico Date: Mon, 17 Jan 2022 09:58:53 +0000 Subject: [PATCH 2/3] Attach PS environment to branch add-counter-column --- .pscale/env/ps-env-ps-attach.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 .pscale/env/ps-env-ps-attach.sh diff --git a/.pscale/env/ps-env-ps-attach.sh b/.pscale/env/ps-env-ps-attach.sh new file mode 100755 index 0000000..c80e963 --- /dev/null +++ b/.pscale/env/ps-env-ps-attach.sh @@ -0,0 +1,19 @@ +#!/bin/bash +export ORG_NAME="planetscale" +echo "::set-output name=ORG_NAME::planetscale" + +export DB_NAME="shared-secrets-jonico" +echo "::set-output name=DB_NAME::shared-secrets-jonico" + +export BRANCH_NAME="add-counter-column" +echo "::set-output name=BRANCH_NAME::add-counter-column" + +export DEPLOY_REQUEST_NUMBER="2" +echo "::set-output name=DEPLOY_REQUEST_NUMBER::2" + +export DEPLOY_REQUEST_URL="https://app.planetscale.com/planetscale/shared-secrets-jonico/deploy-requests/2" +echo "::set-output name=DEPLOY_REQUEST_URL::https://app.planetscale.com/planetscale/shared-secrets-jonico/deploy-requests/2" + +export BRANCH_URL="https://app.planetscale.com/planetscale/shared-secrets-jonico/add-counter-column" +echo "::set-output name=BRANCH_URL::https://app.planetscale.com/planetscale/shared-secrets-jonico/add-counter-column" + From 7a0dda24072c72203f903b75957a9ed8c6242d08 Mon Sep 17 00:00:00 2001 From: Johannes Nicolai Date: Mon, 17 Jan 2022 11:05:55 +0100 Subject: [PATCH 3/3] screenshots for /ps-attach commands --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c80ecf6..c6ea988 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ You can also create a database branch and deploy request based on an [already ex If the PlanetScale deploy request or database branch and your pull request both exist already, you can use the `/ps-attach` command, followed by the PlanetScale URL to your branch/DR: +![image](https://user-images.githubusercontent.com/1872314/149749143-16a484ec-7ebf-41e3-9d93-c81c24876b1e.png) + If you like to refresh the schema information of your branch or add additional DDL statements, use `/ps-update`: ![image](https://user-images.githubusercontent.com/1872314/144099735-8e023ecf-31ef-4129-82d0-3aa91d5c9777.png)