https://github.com/ianmitchell/prisma-migration-warning-action
Checks PRs for potentially unsafe prisma migrations
https://github.com/ianmitchell/prisma-migration-warning-action
Last synced: about 1 year ago
JSON representation
Checks PRs for potentially unsafe prisma migrations
- Host: GitHub
- URL: https://github.com/ianmitchell/prisma-migration-warning-action
- Owner: IanMitchell
- License: mit
- Created: 2022-02-10T05:27:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-03-03T20:04:56.000Z (over 3 years ago)
- Last Synced: 2025-04-12T13:15:57.911Z (about 1 year ago)
- Language: JavaScript
- Size: 2.42 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A very simple action that checks PRs to see if a Prisma schema has lines removed and if there are non Prisma file changes in the PR. If both conditions are true, it will post a configurable message or fail the check.
You may want this to ensure minimal downtime or deploy errors, but it isn't always accurate. It should be used as a loose rule. This is my first stab at the action; it could definitely be improved!
## Usage
```yaml
name: Migration Warning
on: [pull_request]
jobs:
Warning:
name: Unsafe Migration Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ianmitchell/prisma-migration-warning-action@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Options go here
fail: true
```
## Options
- `main-branch` [OPTIONAL] - the name of the main branch (sometimes master). Defaults to `main`.
- `path` [OPTIONAL] - the path to the Prisma directory. Defaults to `prisma`.
- `warning` [OPTIONAL] - whether to post a warning comment or not in the PR. Defaults to `true`.
- `message` [OPTIONAL] - the message to post in the PR. Defaults to a generic warning message.
- `repeat` [OPTIONAL] - whether to post a warning comment every time the action is run. Defaults to `false`.
- `fail` [OPTIONAL] - whether to fail the PR check if the action fails. Defaults to `false`.