-
Notifications
You must be signed in to change notification settings - Fork 0
Update Linear webhooks example with latest implementation #128
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
base: develop
Are you sure you want to change the base?
Conversation
# Motivation The **Codegen on OSS** package provides a pipeline that: - **Collects repository URLs** from different sources (e.g., CSV files or GitHub searches). - **Parses repositories** using the codegen tool. - **Profiles performance** and logs metrics for each parsing run. - **Logs errors** to help pinpoint parsing failures or performance bottlenecks. <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> see [codegen-on-oss/README.md](https://github.com/codegen-sh/codegen-sdk/blob/acfe3dc07b65670af33b977fa1e7bc8627fd714e/codegen-on-oss/README.md) # Testing <!-- How was the change tested? --> `uv run modal run modal_run.py` No unit tests yet 😿 # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [x] I have updated the documentation or added new documentation as needed
Original commit by Tawsif Kamal: Revert "Revert "Adding Schema for Tool Outputs"" (codegen-sh#894) Reverts codegen-sh#892 --------- Co-authored-by: Rushil Patel <[email protected]> Co-authored-by: rushilpatel0 <[email protected]>
Original commit by Ellen Agarwal: fix: Workaround for relace not adding newlines (codegen-sh#907)
Reviewer's GuideThis PR modernizes the Linear webhooks example by refactoring the webhook handlers to a class-based approach with robust logging and the new LinearEvent type, updating dependencies and environment template, and introducing a comprehensive README for setup, deployment, and troubleshooting. Sequence Diagram for Linear Webhook Event ProcessingsequenceDiagram
actor L as Linear
participant M as Modal Platform
participant H as LinearEventHandlers
L->>+M: POST /webhook (e.g., Issue Event)
M->>+H: invoke handle_issue(event: LinearEvent)
note over M,H: Routing based on @app.linear.event("Issue") decorator
activate H
H->>H: logger.info(f"Received Linear Issue event: {event.action} - {event.data.title}")
H->>H: Process event.data (e.g., event.data.id, event.data.title)
H-->>-M: Response: {"status": "success", "issue_id": event.data.id, ...}
M-->>-L: HTTP 200 OK
Class Diagram for
|
Change | Details | Files |
---|---|---|
Refactor webhook handlers to use class-based structure with LinearEvent and logging |
|
webhooks.py |
Expand and organize project dependencies |
|
pyproject.toml |
Enhance environment template documentation and variables |
|
.env.template |
Add comprehensive README with setup and deployment guidance |
|
README.md |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai review
on the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with@sourcery-ai issue
to create an issue from it. - Generate a pull request title: Write
@sourcery-ai
anywhere in the pull
request title to generate a title at any time. You can also comment
@sourcery-ai title
on the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summary
anywhere in
the pull request body to generate a PR summary at any time exactly where you
want it. You can also comment@sourcery-ai summary
on the pull request to
(re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guide
on the pull
request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolve
on the
pull request to resolve all Sourcery comments. Useful if you've already
addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismiss
on the pull
request to dismiss all existing Sourcery reviews. Especially useful if you
want to start fresh with a new review - don't forget to comment
@sourcery-ai review
to trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request
summary, the reviewer's guide, and others. - Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I see a check failed - I'm on it! 🫡 |
I see a check failed - I'm on it! 🫡 |
This PR updates the Linear webhooks example with the latest implementation from the Codegen SDK and adds a comprehensive README.md with deployment instructions.
Changes:
Updated
webhooks.py
with:Enhanced
.env.template
with better documentation and additional variablesUpdated
pyproject.toml
with more comprehensive dependenciesAdded a detailed README.md with:
These changes make the Linear webhooks example more complete, up-to-date, and easier to use.
💻 View my work • About Codegen
Summary by Sourcery
Update the Linear webhooks example to use the latest Codegen SDK implementation, including structured event handling, logging, new comment handler, environment configuration updates, dependency enhancements, and a detailed README.
New Features:
Enhancements:
Build:
Documentation: