File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
codegen-examples/examples/linear_webhooks Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
LINEAR_ACCESS_TOKEN="..."
2
2
LINEAR_SIGNING_SECRET="..."
3
- LINEAR_TEAM_ID="..."
3
+ LINEAR_TEAM_ID="..."
Original file line number Diff line number Diff line change @@ -3,10 +3,7 @@ name = "linear-webhook-example"
3
3
version = " 0.1.0"
4
4
description = " Linear webhook example for Codegen"
5
5
requires-python = " >=3.13"
6
- dependencies = [
7
- " modal>=0.73.25" ,
8
- " codegen" ,
9
- ]
6
+ dependencies = [" modal>=0.73.25" , " codegen" ]
10
7
11
8
[tool .uv .sources ]
12
9
codegen = { git = " https://github.com/codegen-sh/codegen-sdk" , rev = " rpatel/wip-events-decorator" }
Original file line number Diff line number Diff line change 1
- import os
2
1
import modal .running_app
3
2
from codegen .extensions .events .app import CodegenApp
4
3
import modal
5
4
6
- image = modal .Image .debian_slim (python_version = "3.13" ).apt_install ("git" ).pip_install ("fastapi[standard]" ,"codegen>=0.5.30" )
5
+ image = modal .Image .debian_slim (python_version = "3.13" ).apt_install ("git" ).pip_install ("fastapi[standard]" , "codegen>=0.5.30" )
7
6
8
7
app = CodegenApp (name = "test-linear" , modal_api_key = "" , image = image )
9
8
10
9
# Here is an example implementation of setting up an endpoint for receiving webhook events from Linear.
11
10
# The @app.linear.event() decorator takes care of subscribing to the webhook and also unsubscribing when the deployment spun
12
11
12
+
13
13
@app .cls (secrets = [modal .Secret .from_dotenv ()])
14
14
class LinearEventHandlers :
15
15
@modal .enter ()
@@ -27,4 +27,3 @@ def test(self, data: dict):
27
27
# handle webhook event
28
28
# data is the payload of the webhook event
29
29
print (data )
30
-
You can’t perform that action at this time.
0 commit comments