From 8f02bc50907d37817f9cfa29be8e2ab43dc0ce91 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:55:38 +0000 Subject: [PATCH 1/4] feat: Add PR welcome message system with uvx installation examples - Add GitHub workflow to automatically comment on new PRs - Include community and internal welcome message templates - Provide uvx syntax for testing PyAirbyte from PR branches - Include links to #pyairbyte Slack channel and documentation - Add slash command documentation for PR automation Requested by @aaronsteers Co-Authored-By: AJ Steers --- .github/pr-welcome-community.md | 38 ++++++++++++++++++++++ .github/pr-welcome-internal.md | 37 +++++++++++++++++++++ .github/workflows/welcome-message.yml | 46 +++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 .github/pr-welcome-community.md create mode 100644 .github/pr-welcome-internal.md create mode 100644 .github/workflows/welcome-message.yml diff --git a/.github/pr-welcome-community.md b/.github/pr-welcome-community.md new file mode 100644 index 000000000..0fbee365c --- /dev/null +++ b/.github/pr-welcome-community.md @@ -0,0 +1,38 @@ +## 👋 Welcome to PyAirbyte! + +Thank you for your contribution from **{{ .repo_name }}**! We're excited to have you in the Airbyte community. + +### Testing This PyAirbyte Version + +You can test this version of PyAirbyte using the following: + +```bash +# Run PyAirbyte CLI from this branch: +uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyab --help + +# Or use the full command name: +uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyairbyte --help + +# Install PyAirbyte from this branch for development: +pip install 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' +``` + +### Helpful Resources + +- [Contributing Guidelines](https://github.com/airbytehq/PyAirbyte/blob/main/docs/CONTRIBUTING.md) +- [PyAirbyte Documentation](https://docs.airbyte.com/using-airbyte/pyairbyte/getting-started) +- [API Reference](https://airbytehq.github.io/PyAirbyte/) + +### PR Slash Commands + +As needed or by request, Airbyte Maintainers can execute the following slash commands on your PR: + +- `/fix-pr` - Fixes most formatting and linting issues +- `/poetry-lock` - Updates poetry.lock file +- `/test-pr` - Runs tests with the updated PyAirbyte + +### Community Support + +If you have any questions, feel free to ask in the PR comments or join our community: +- [Airbyte Slack](https://airbytehq.slack.com/) - Join the [#pyairbyte channel](https://airbytehq.slack.com/archives/C06FZ238P8W) +- [GitHub Discussions](https://github.com/airbytehq/PyAirbyte/discussions) diff --git a/.github/pr-welcome-internal.md b/.github/pr-welcome-internal.md new file mode 100644 index 000000000..8f36f76f1 --- /dev/null +++ b/.github/pr-welcome-internal.md @@ -0,0 +1,37 @@ +## 👋 Greetings, Airbyte Team Member! + +Here are some helpful tips and reminders for your convenience. + +### Testing This PyAirbyte Version + +You can test this version of PyAirbyte using the following: + +```bash +# Run PyAirbyte CLI from this branch: +uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyab --help + +# Or use the full command name: +uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyairbyte --help + +# Install PyAirbyte from this branch for development: +pip install 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' +``` + +### Helpful Resources + +- [PyAirbyte Documentation](https://docs.airbyte.com/using-airbyte/pyairbyte/getting-started) +- [API Reference](https://airbytehq.github.io/PyAirbyte/) + +### PR Slash Commands + +Airbyte Maintainers can execute the following slash commands on your PR: + +- `/fix-pr` - Fixes most formatting and linting issues +- `/poetry-lock` - Updates poetry.lock file +- `/test-pr` - Runs tests with the updated PyAirbyte + +### Community Support + +Questions? Join the [#pyairbyte channel](https://airbytehq.slack.com/archives/C06FZ238P8W) in our Slack workspace. + +[📝 _Edit this welcome message._](https://github.com/airbytehq/PyAirbyte/blob/main/.github/pr-welcome-internal.md) diff --git a/.github/workflows/welcome-message.yml b/.github/workflows/welcome-message.yml new file mode 100644 index 000000000..78a0d3add --- /dev/null +++ b/.github/workflows/welcome-message.yml @@ -0,0 +1,46 @@ +name: Community PR Welcome Message + +# This workflow automatically adds a welcome message to PRs from community contributors (forks) +# It includes PyAirbyte usage instructions and other helpful resources for testing changes +# +# MANUAL TESTING INSTRUCTIONS: +# To manually test this workflow, temporarily uncomment the "synchronize" event type as a workflow trigger. +# Then the workflow will run for all new commits. +# +# Before merging, remember to again comment-out the "synchronize" clause and uncomment the `if:` condition. + +on: + pull_request: + types: + - opened + - reopened + # Toggle this line, uncommenting for testing: + # - synchronize + +jobs: + welcome-contributor: + name: PR Welcome Message + permissions: + contents: read + issues: write + pull-requests: write + runs-on: ubuntu-24.04 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Render template + id: template + uses: chuhlomin/render-template@v1.4 + with: + # Use a different template for internal vs forks (community) + template: ${{ github.event.pull_request.head.repo.fork == true && '.github/pr-welcome-community.md' || '.github/pr-welcome-internal.md' }} + vars: | + repo_name: ${{ github.event.pull_request.head.repo.full_name }} + branch_name: ${{ github.event.pull_request.head.ref }} + + - name: Create comment + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.pull_request.number }} + body: ${{ steps.template.outputs.result }} From b6c5130994eb79c7e7d4f551cc1dbc7ea68e8b9c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:57:52 +0000 Subject: [PATCH 2/4] fix: Use repo_name variable for fork URLs in community welcome template - Replace hardcoded airbytehq/PyAirbyte with {{ .repo_name }} template variable - Ensures uvx commands work correctly for community forks - Addresses feedback from @aaronsteers on PR #721 Co-Authored-By: AJ Steers --- .github/pr-welcome-community.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/pr-welcome-community.md b/.github/pr-welcome-community.md index 0fbee365c..c6264b832 100644 --- a/.github/pr-welcome-community.md +++ b/.github/pr-welcome-community.md @@ -8,13 +8,13 @@ You can test this version of PyAirbyte using the following: ```bash # Run PyAirbyte CLI from this branch: -uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyab --help +uvx 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyab --help # Or use the full command name: -uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyairbyte --help +uvx 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyairbyte --help # Install PyAirbyte from this branch for development: -pip install 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' +pip install 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' ``` ### Helpful Resources From 08d247ff4a037b56e46a983763cec827caf3c202 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 02:01:31 +0000 Subject: [PATCH 3/4] fix: Use correct uvx --from syntax for CLI commands - Add --from flag to uvx commands as required when package name differs from CLI name - Addresses @aaronsteers feedback on PR #721 about incorrect uvx syntax - Follows PyAirbyte CLI documentation pattern: uvx --from=airbyte pyab --help Co-Authored-By: AJ Steers --- .github/pr-welcome-community.md | 4 ++-- .github/pr-welcome-internal.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/pr-welcome-community.md b/.github/pr-welcome-community.md index c6264b832..f67cbd872 100644 --- a/.github/pr-welcome-community.md +++ b/.github/pr-welcome-community.md @@ -8,10 +8,10 @@ You can test this version of PyAirbyte using the following: ```bash # Run PyAirbyte CLI from this branch: -uvx 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyab --help +uvx --from 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyab --help # Or use the full command name: -uvx 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyairbyte --help +uvx --from 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyairbyte --help # Install PyAirbyte from this branch for development: pip install 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' diff --git a/.github/pr-welcome-internal.md b/.github/pr-welcome-internal.md index 8f36f76f1..ea6e1ee24 100644 --- a/.github/pr-welcome-internal.md +++ b/.github/pr-welcome-internal.md @@ -8,10 +8,10 @@ You can test this version of PyAirbyte using the following: ```bash # Run PyAirbyte CLI from this branch: -uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyab --help +uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyab --help # Or use the full command name: -uvx 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyairbyte --help +uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyairbyte --help # Install PyAirbyte from this branch for development: pip install 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' From 1c491477f129e9ce7068c8d4634da4a46e5a8d30 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 02:03:12 +0000 Subject: [PATCH 4/4] refactor: Simplify welcome templates by removing pyab alias - Remove shorter 'pyab' syntax to save space in welcome message - Keep only the full 'pyairbyte' command as suggested by @aaronsteers - Addresses feedback on PR #721 about reducing template verbosity Co-Authored-By: AJ Steers --- .github/pr-welcome-community.md | 3 --- .github/pr-welcome-internal.md | 3 --- 2 files changed, 6 deletions(-) diff --git a/.github/pr-welcome-community.md b/.github/pr-welcome-community.md index f67cbd872..c5004aad9 100644 --- a/.github/pr-welcome-community.md +++ b/.github/pr-welcome-community.md @@ -8,9 +8,6 @@ You can test this version of PyAirbyte using the following: ```bash # Run PyAirbyte CLI from this branch: -uvx --from 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyab --help - -# Or use the full command name: uvx --from 'git+https://github.com/{{ .repo_name }}.git@{{ .branch_name }}' pyairbyte --help # Install PyAirbyte from this branch for development: diff --git a/.github/pr-welcome-internal.md b/.github/pr-welcome-internal.md index ea6e1ee24..7d17cfdb9 100644 --- a/.github/pr-welcome-internal.md +++ b/.github/pr-welcome-internal.md @@ -8,9 +8,6 @@ You can test this version of PyAirbyte using the following: ```bash # Run PyAirbyte CLI from this branch: -uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyab --help - -# Or use the full command name: uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@{{ .branch_name }}' pyairbyte --help # Install PyAirbyte from this branch for development: