{"id":19026575,"url":"https://github.com/sbdchd/squawk-action","last_synced_at":"2025-04-23T12:51:14.497Z","repository":{"id":65161662,"uuid":"518175053","full_name":"sbdchd/squawk-action","owner":"sbdchd","description":"Github Action for Linting Postgres Migrations with Squawk","archived":false,"fork":false,"pushed_at":"2025-04-09T13:43:49.000Z","size":219,"stargazers_count":11,"open_issues_count":3,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T00:11:11.823Z","etag":null,"topics":["github-actions","postgres"],"latest_commit_sha":null,"homepage":"https://github.com/sbdchd/squawk","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbdchd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-07-26T18:29:23.000Z","updated_at":"2025-04-09T12:42:30.000Z","dependencies_parsed_at":"2023-01-04T12:38:57.593Z","dependency_job_id":"fc4dde7d-6083-408a-a2a7-2eada9503e52","html_url":"https://github.com/sbdchd/squawk-action","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"78ef9ddf21ac8a3cdbd3c8e581426067419ded91"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbdchd%2Fsquawk-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbdchd%2Fsquawk-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbdchd%2Fsquawk-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbdchd%2Fsquawk-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbdchd","download_url":"https://codeload.github.com/sbdchd/squawk-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250438077,"owners_count":21430809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","postgres"],"created_at":"2024-11-08T20:49:43.053Z","updated_at":"2025-04-23T12:51:14.491Z","avatar_url":"https://github.com/sbdchd.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# squawk-action ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/sbdchd/squawk-action?display_name=tag\u0026sort=semver)\n\nA GitHub Action for [Squawk](https://github.com/sbdchd/squawk).\n\nLint Postgres migrations and report violations as a comment in a GitHub Pull Request ([example PR](https://github.com/sbdchd/squawk/pull/14#issuecomment-647009446)).\n\nFor more information on Squawk, see the [Squawk GitHub repository](https://github.com/sbdchd/squawk) or [website](https://squawkhq.com).\n\n## basic usage\n\nLint every .sql file in `migrations/` on every pull request.\n\n```yml\n# .github/workflows/lint-migrations.yml\nname: Lint Migrations\n\non: pull_request\n\njobs:\n  lint_migrations:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n      - uses: sbdchd/squawk-action@v2\n        with:\n          pattern: \"migrations/*.sql\"\n          version: \"latest\"\n```\n\n## advanced usage\n\nOnly lint modified .sql files in the `migrations/`.\n\n```yml\n# .github/workflows/lint-migrations.yml\nname: Lint Migrations\n\non: pull_request\n\njobs:\n  lint_migrations:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n      - name: Find modified migrations\n        run: |\n          modified_migrations=$(git diff --diff-filter=d --name-only origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF 'migrations/*.sql')\n          echo \"$modified_migrations\"\n          echo \"file_names=$modified_migrations\" \u003e\u003e $GITHUB_OUTPUT\n        id: modified-migrations\n      - uses: sbdchd/squawk-action@v2\n        with:\n          files: ${{ steps.modified-migrations.outputs.file_names }}\n```\n\n\u003e [!TIP]\n\u003e See `action.yml` for more action inputs.\n\n## example report\n\n[![Example Squawk PR Comment](./squawk-pr-comment.png)](https://github.com/sbdchd/squawk/pull/14#issuecomment-647009446)\n\n## development\n\n### releasing a new version\n\n1. [Release a new version](https://github.com/sbdchd/squawk-action/releases) (e.g. v5.2.1)\n2. Update major version tag to point to commit.\n   ```bash\n   git tag v5\n   git push --tags\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbdchd%2Fsquawk-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbdchd%2Fsquawk-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbdchd%2Fsquawk-action/lists"}