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

add(CI): eslint, prettier, typescript for npm related install scripts #14

Merged
merged 3 commits into from
Jun 17, 2020

Conversation

sbdchd
Copy link
Owner

@sbdchd sbdchd commented Jun 17, 2020

Ensure we run typescript, eslint, and prettier against the js install
scripts used in the npm install method.

Ensure we run typescript, eslint, and prettier against the js install
scripts used in the npm install method.
@sbdchd sbdchd added the automerge automerge with kodiak label Jun 17, 2020
@kodiakhq kodiakhq bot merged commit 19674ba into master Jun 17, 2020
@kodiakhq kodiakhq bot deleted the steve/add-ci-for-js-install-scripts branch June 17, 2020 03:24
@sbdchd
Copy link
Owner Author

sbdchd commented Jun 20, 2020

Test comment

@sbdchd
Copy link
Owner Author

sbdchd commented Jun 20, 2020

Another test comment

@squawk-squawk
Copy link

squawk-squawk bot commented Jun 20, 2020

Squawk Report

2 violations across 1 file(s)

./0077_ingredient_foo.sql

BEGIN;
--
-- Add field foo to ingredient
--
ALTER TABLE "core_ingredient" ADD COLUMN "foo" text DEFAULT '' NOT NULL;
ALTER TABLE "core_ingredient" ALTER COLUMN "foo" DROP DEFAULT;
COMMIT;

🚒 Rule Violations (2)

./0077_ingredient_foo.sql:2:1: warning: adding-not-nullable-field

   2 | --
   3 | -- Add field foo to ingredient
   4 | --
   5 | ALTER TABLE "core_ingredient" ADD COLUMN "foo" text DEFAULT '' NOT NULL;

  note: Adding a NOT NULL field requires exclusive locks and table rewrites.
  help: Make the field nullable.

./0077_ingredient_foo.sql:2:1: warning: adding-field-with-default

   2 | --
   3 | -- Add field foo to ingredient
   4 | --
   5 | ALTER TABLE "core_ingredient" ADD COLUMN "foo" text DEFAULT '' NOT NULL;

  note: In Postgres versions <11 adding a field with a DEFAULT requires a table rewrite with an ACCESS EXCLUSIVE lock.
  help: Add the field as nullable, then set a default, backfill, and remove nullabilty.

📚 More info on rules

⚡️ Powered by Squawk

kodiakhq bot pushed a commit that referenced this pull request Jun 21, 2020
Comment on Pull Requests with a comment containing SQL and the errors `squawk` reports.

Could be paired with django migrations where a script runs [`sqlmigrate`](https://docs.djangoproject.com/en/3.0/ref/django-admin/#django-admin-sqlmigrate) to create `.sql` files for each migration.

Then `squawk` runs over all those files and leaves a comment on the specified PR.

Subsequent runs of `squawk` will update the existing comment. 

example: #14 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge automerge with kodiak
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant