feature(connector_sdk): Adding github workflows#3
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces GitHub repository automation for the Connector SDK repo, including CI workflows, issue/PR templates, Copilot review instruction files, and local developer tooling (hooks + formatting scripts).
Changes:
- Add GitHub Actions workflows for README enforcement, Python formatting/lint checks, and automatic PR labeling.
- Add GitHub templates/instructions to standardize PRs, issues, and Copilot review behavior.
- Add local scripts/hooks plus a repo-level
.flake8configuration to align formatting/linting.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 19 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/enforce-readme-update.yml |
PR check to require root README.md updates when new directories are added |
.github/workflows/code-quality-check.yml |
CI for Black + Flake8 and PR commenting of results |
.github/workflows/add-label.yml |
Auto-label PRs by size and add default metadata labels |
.github/scripts/setup-hooks.sh |
Helper to set core.hooksPath for local Git hooks |
.github/scripts/fix-python-formatting.sh |
Helper script to run Black formatting locally |
.github/git_hooks/pre-commit |
Pre-commit hook to auto-format staged Python files with Black |
.github/PULL_REQUEST_TEMPLATE.md |
Standard PR template (ticket, description, testing, checklist) |
.github/ISSUE_TEMPLATE/request.yml |
Issue template for feature/idea requests |
.github/ISSUE_TEMPLATE/bug_report.yml |
Issue template for bug reports |
.github/instructions/readme-markdown.instructions.md |
Copilot instructions for README/Markdown review style and structure |
.github/instructions/python-review.instructions.md |
Copilot instructions for Python PR review (SDK v2+, linting, patterns) |
.github/instructions/configuration-review.instructions.md |
Copilot instructions for reviewing configuration.json and JSON conventions |
.github/copilot-instructions.md |
High-level Copilot guidance for this repository |
.flake8 |
Repo Flake8 configuration (line length, selects/ignores, excludes) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Run black and generate diff | ||
| id: black_check | ||
| run: | | ||
| echo "Running black in check mode with diff output..." | ||
| black --check --diff --line-length 99 . > formatting.diff || true | ||
|
|
||
| if [ -s formatting.diff ]; then | ||
| echo "Formatting issues detected:" | ||
| cat formatting.diff | ||
| echo "black_failed=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "No formatting issues found." | ||
| fi |
There was a problem hiding this comment.
This workflow runs Black against the entire repo (black ... .) even when the PR doesn't touch Python files. That can cause unrelated PRs to fail due to pre-existing formatting issues. If the intent is to only gate on Python changes in the PR, run Black only when changed_files.txt is non-empty and/or target only the changed Python files (similar to the Flake8 step).
| # Check again after install | ||
| if ! command -v black &> /dev/null; then | ||
| echo "Failed to install 'black'. Aborting formatting but allowing commit!" | ||
| exit 0 # Github Actions will prevent merging of PRs if its not properly formatted, we want to continue with the commit. |
There was a problem hiding this comment.
Spelling: use "GitHub Actions" (capital H) in this comment to match the official name.
| exit 0 # Github Actions will prevent merging of PRs if its not properly formatted, we want to continue with the commit. | |
| exit 0 # GitHub Actions will prevent merging of PRs if its not properly formatted, we want to continue with the commit. |
| - **API example** | ||
| - This example shows how to sync data using an API key and secret." | ||
|
|
||
| The correct format and style would be as follows: | ||
|
|
||
| - API example - This example shows how to sync data using an API key and secret." |
There was a problem hiding this comment.
The Markdown examples include stray trailing double quotes at the end of sentences, which makes the examples look like malformed Markdown. Please remove the trailing " characters from these example lines.
| Use bulleted lists when just listing items in no particular order or when listing the alternatives, for example: | ||
| The management actions are as follows: | ||
| - Create connection | ||
| - Retrieve connection | ||
| - Delete connection" |
There was a problem hiding this comment.
This example line ends with an extra trailing double quote, which makes the Markdown example look malformed. Please remove the trailing ".
| To obtain your API key, do the following: | ||
| 1. Log in to your DreemBleem account. | ||
| 2. Go to **Settings > API Key**. | ||
| 3. Make a note the API key and secret. You will need to add it to `configuration.json` file later." |
There was a problem hiding this comment.
This numbered list example ends with an extra trailing double quote. Please remove the trailing " so the example reads cleanly.
| 3. Make a note the API key and secret. You will need to add it to `configuration.json` file later." | |
| 3. Make a note the API key and secret. You will need to add it to `configuration.json` file later. |
Links https://fivetran.atlassian.net/browse/RD-1185693
Closes https://fivetran.atlassian.net/browse/RD-1185693
Changes
Added github workflows and automations