chore: Add workflow to auto-label community PRs from forks#904
Conversation
Co-Authored-By: AJ Steers <aj@airbyte.io>
Original prompt from AJ Steers |
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
👋 Greetings, Airbyte Team Member!Here are some helpful tips and reminders for your convenience. Testing This PyAirbyte VersionYou can test this version of PyAirbyte using the following: # Run PyAirbyte CLI from this branch:
uvx --from 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1765396924-label-community-prs' pyairbyte --help
# Install PyAirbyte from this branch for development:
pip install 'git+https://github.com/airbytehq/PyAirbyte.git@devin/1765396924-label-community-prs'Helpful ResourcesPR Slash CommandsAirbyte Maintainers can execute the following slash commands on your PR:
Community SupportQuestions? Join the #pyairbyte channel in our Slack workspace. |
📝 WalkthroughWalkthroughAdds a GitHub Actions workflow that auto-labels pull requests from forked repositories with "community". It triggers on Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/label-community-prs.yml (1)
16-16: Confirm the "community" label exists in the repository.The workflow assumes the "community" label already exists and will apply it idempotently. Per the PR checklist, have you verified that this label exists in your repo's label configuration? If it doesn't exist yet, the API will auto-create it with default styling, which may not match your team's conventions.
Would you like me to help verify this or generate a script to check/create the label?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/label-community-prs.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Pytest (All, Python 3.10, Ubuntu)
- GitHub Check: Pytest (All, Python 3.11, Ubuntu)
- GitHub Check: Pytest (All, Python 3.10, Windows)
- GitHub Check: Pytest (All, Python 3.11, Windows)
- GitHub Check: Pytest (No Creds)
- GitHub Check: Pytest (Fast)
🔇 Additional comments (2)
.github/workflows/label-community-prs.yml (2)
1-27: Solid security posture for auto-labeling fork PRs.The workflow correctly uses
pull_request_targetwithout any code checkout, which is the recommended pattern for safe operations like labeling and commenting on fork PRs. The fork PR labeling use case is exactly whatpull_request_targetwas designed for — to label PRs without processing dangerous code. The fork guard on line 16 and minimal permissions are well-executed.
6-10: Trigger configuration is appropriate.The
openedandreopenedevent types are the right choice for this use case — they cover the full lifecycle of a fork PR coming back into focus.
Co-Authored-By: AJ Steers <aj@airbyte.io>
Co-Authored-By: AJ Steers <aj@airbyte.io>
Summary
Adds a GitHub Actions workflow that automatically applies the
communitylabel to PRs opened from forks. This enables automatic tracking on the Community PRs project board.The workflow:
pull_request_targetevents (openedandreopened)if: github.event.pull_request.head.repo.fork == true)actions-ecosystem/action-add-labelsmarketplace action (v1.1.3, pinned by SHA)addLabelsAPI is idempotent—if the label already exists, it succeeds without errorReview & Testing Checklist for Human
pull_request_target)communitylabel exists in this repositorybd52874380e3909a1ac983768df6976535ece7f8) matches v1.1.3Test plan: After merging, open a PR from a fork (or close/reopen an existing fork PR) to verify the label is applied automatically.
Notes
This workflow cannot be tested via CI since it only triggers on actual fork PRs.
Requested by: Aaron ("AJ") Steers (@aaronsteers) (AJ Steers)
Devin session: https://app.devin.ai/sessions/b0784474061f4084a04ce5251ce1e9f2
Important
Auto-merge enabled.
This PR is set to merge automatically when all requirements are met.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.
Note
Auto-merge may have been disabled. Please check the PR status to confirm.