Repository navigation
Add branch workflow and selectable SQL dialects #2
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
Merged
+913
−211
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
c2c3e70
Document branch workflow
enumura1 f96cba3
Support selectable SQL dialects
enumura1 a31a878
Organize tests by responsibility
enumura1 f86fab8
Add CodeRabbit review config
enumura1 bec18f2
Update contribution scope for dialects
enumura1 e19b4b0
Add branch naming examples
enumura1 2124402
Add agent project map
enumura1 f00c240
Accept SQLGlot dialect settings
enumura1 6c6c3f5
Default to generic SQL dialect
enumura1 a3104cd
Add short dialect option
enumura1 80e7337
Limit dialects to explicit support
enumura1 c076721
Add MySQL dialect support
enumura1 32f7222
Cover explicit dialect CLI paths
enumura1 23010d8
Guard Redshift command formatting
enumura1 6031035
Clarify Redshift command input docs
enumura1 4a4cdf9
Adjust homepage hero layout
enumura1 fecbd5c
Use token-aware Redshift detection
enumura1 b1b8404
Add branch workflow diagram
enumura1 e7ca40e
Format token-aware formatter change
enumura1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| language: en-US | ||
|
|
||
| reviews: | ||
| profile: chill | ||
| request_changes_workflow: false | ||
| high_level_summary: true | ||
| review_status: true | ||
| auto_review: | ||
| enabled: true | ||
| drafts: false | ||
| path_filters: | ||
| - "!dist/**" | ||
| - "!website/build/**" | ||
| - "!website/.docusaurus/**" | ||
| path_instructions: | ||
| - path: "py_sql_cleaner/**/*.py" | ||
| instructions: > | ||
| Review against the layered architecture in docs/architecture/README.md. | ||
| Keep SQLGlot isolated in adapters, keep Typer and Rich in cli, and keep | ||
| application code dependent on formatter ports instead of concrete | ||
| adapters. | ||
| - path: "tests/**/*.py" | ||
| instructions: > | ||
| Prefer focused behavior tests that cover CLI behavior, formatter | ||
| behavior, and safety around skipped f-strings or Jinja-like templates. | ||
| - path: "docs/**" | ||
| instructions: > | ||
| Keep development documentation concise and consistent with | ||
| CONTRIBUTING.md and docs/architecture/README.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # Branching Strategy | ||
|
|
||
| This repository uses a lightweight GitHub Flow. Keep the model simple: | ||
| `main` is protected, short-lived branches carry changes, and every change lands | ||
| through a pull request. | ||
|
|
||
| ```mermaid | ||
| gitGraph | ||
| commit id: "main"s | ||
| branch feature/add-postgres-dialect | ||
| checkout feature/add-postgres-dialect | ||
| commit id: "focused change" | ||
| commit id: "tests/docs" | ||
| checkout main | ||
| merge feature/add-postgres-dialect id: "PR merge" | ||
| branch fix/preserve-copy-options | ||
| checkout fix/preserve-copy-options | ||
| commit id: "bug fix" | ||
| checkout main | ||
| merge fix/preserve-copy-options id: "PR merge" | ||
| ``` | ||
|
|
||
| ## Branches | ||
|
|
||
| - `main` is the only long-lived branch. | ||
| - `main` should always be releasable. | ||
| - Do not push commits directly to `main`. | ||
| - Do not create a permanent `develop` branch. This project is small enough that | ||
| a second integration branch would add delay without improving safety. | ||
| - Create short-lived branches from the latest `main`. | ||
|
|
||
| Use these branch name prefixes: | ||
|
|
||
| - `feature/<short-name>` for user-facing behavior or new capabilities. | ||
| - `fix/<short-name>` for bug fixes. | ||
| - `docs/<short-name>` for documentation-only changes. | ||
| - `chore/<short-name>` for maintenance, tooling, or dependency updates. | ||
| - `release/<version>` only when release preparation needs multiple commits. | ||
| - `hotfix/<short-name>` for urgent fixes based on `main`. | ||
|
|
||
| Examples: | ||
|
|
||
| - `feature/add-postgres-dialect` | ||
| - `fix/preserve-copy-options` | ||
| - `docs/branching-strategy` | ||
| - `chore/update-ci-python` | ||
| - `release/0.2.0` | ||
| - `hotfix/formatter-crash` | ||
|
|
||
| ## Normal Change Flow | ||
|
|
||
| 1. Update local `main` from `origin/main`. | ||
| 2. Create a short-lived branch. | ||
| 3. Keep commits focused and related to one change. | ||
| 4. Open a draft pull request early if feedback or CI visibility is useful. | ||
| 5. Run `scripts/check` locally before marking the pull request ready. | ||
| 6. Merge only after required checks pass and the review expectation is met. | ||
| 7. Delete the branch after merge. | ||
|
|
||
| Prefer squash merges for small, focused pull requests so `main` stays readable. | ||
| Use a regular merge only when preserving multiple commits adds clear value. | ||
|
|
||
| ## Pull Request Rules | ||
|
|
||
| Each pull request should include: | ||
|
|
||
| - A short summary of the behavior or documentation change. | ||
| - Tests or a note explaining why tests were not needed. | ||
| - Any migration, release, or compatibility notes. | ||
| - Confirmation that `scripts/check` passed locally, unless CI is the only | ||
| practical validation path. | ||
|
|
||
| Pull requests should stay small. If a branch grows into unrelated changes, split | ||
| it before review. | ||
|
|
||
| ## Releases | ||
|
|
||
| Releases are cut from `main`. | ||
|
|
||
| 1. Merge release preparation changes through a pull request. | ||
| 2. Tag the release commit on `main`. | ||
| 3. Build and publish artifacts from the tagged commit. | ||
|
|
||
| Do not release from feature branches. | ||
|
|
||
| ## Repository Protection | ||
|
|
||
| Configure GitHub branch protection for `main`: | ||
|
|
||
| - Require pull requests before merging. | ||
| - Require status checks to pass before merging. | ||
| - Require branches to be up to date before merging when GitHub can enforce it | ||
| without creating excessive noise. | ||
| - Restrict direct pushes to `main`. | ||
|
|
||
| One approval can be optional if required checks are strong, but changes should | ||
| still go through a pull request rather than direct pushes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.