🤖 TEST: Add SQL Review Action (#307)
https://github.com/marketplace/actions/sql-review
This commit is contained in:
18
.github/workflows/sql-review.yml
vendored
Normal file
18
.github/workflows/sql-review.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# https://github.com/marketplace/actions/sql-review
|
||||
|
||||
name: SQL Review
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
sql-review:
|
||||
runs-on: ubuntu-latest
|
||||
name: SQL Review
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check SQL
|
||||
uses: bytebase/sql-review-action@main
|
||||
with:
|
||||
database-type: MYSQL
|
||||
file-pattern: ^sql/.*\.sql$
|
||||
override-file-path: ./sql-review-override.yml
|
||||
27
.github/workflows/stale.yml
vendored
27
.github/workflows/stale.yml
vendored
@@ -1,27 +0,0 @@
|
||||
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||
#
|
||||
# You can adjust the behavior by modifying this file.
|
||||
# For more information, see:
|
||||
# https://github.com/actions/stale
|
||||
name: Mark stale issues and pull requests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '45 15 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
stale-issue-message: 'Stale issue message'
|
||||
stale-pr-message: 'Stale pull request message'
|
||||
stale-issue-label: 'no-issue-activity'
|
||||
stale-pr-label: 'no-pr-activity'
|
||||
13
sql-review-override.yml
Normal file
13
sql-review-override.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
template: bb.sql-review.prod
|
||||
ruleList:
|
||||
- type: naming.index.pk
|
||||
level: WARNING
|
||||
- type: naming.index.fk
|
||||
level: WARNING
|
||||
- type: naming.index.uk
|
||||
payload:
|
||||
format: "^idx_{{table}}_unique_{{column_list}}$"
|
||||
- type: column.no-null
|
||||
level: WARNING
|
||||
- type: table.no-foreign-key
|
||||
level: DISABLED
|
||||
Reference in New Issue
Block a user