Lambda function for automated PR reviews
- install the openai and requests modules.
- Uncomment the main logic at the end of the python file.
- Get openai keys, Github personal access token to access the respective apis.
- Create a Python 3.10 runtime layer that provides the openai, requests and json libraries
- Create a Python 3.10 lambda that uses the above layer and the code from the pr_reviewer.py.
- create the prompt.txt file in the lambda file structure.
- Enable github webhooks for your organisation, use the lambda url as a listener.
- Select "Pull Request" event for listening.