Skip to content

Commit ab9af60

Browse files
committed
Update: Functioning lambda function for opening a very specific PR
1 parent 5f862d8 commit ab9af60

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

lambda_function.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import json
2+
import os
3+
from github import Github
4+
5+
def lambda_handler(event, context):
6+
7+
g = Github(os.environ['github_token'])
8+
repo = g.get_repo("aduyko/test-lambda-github")
9+
pr = repo.create_pull(title="Testing lambda", body="Sample body text", head="ad-test", base="master")
10+
11+
return {
12+
'statusCode': 200,
13+
'body': json.dumps(pr.id)
14+
}
15+
16+

0 commit comments

Comments
 (0)