Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use /ps-attach command #11

Merged
merged 3 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .pscale/env/ps-env-ps-attach.sh
Original file line number Diff line number Diff line change
@@ -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"

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ 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:

![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)
Expand Down