From 920e1bc1db0de4311862aa4d281fe68971990bc8 Mon Sep 17 00:00:00 2001 From: Antoine Barthelemy Date: Sat, 20 May 2023 18:49:52 +0200 Subject: [PATCH] ok --- src/main.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main.py b/src/main.py index fe8e561..f822409 100755 --- a/src/main.py +++ b/src/main.py @@ -1,7 +1,16 @@ #!/usr/bin/env python3 """ -This module generates a pull request description using -the OpenAI GPT-3.5 language model. +This module generates a pull request description using the OpenAI GPT-3.5 language model. + +The module includes a 'main' function that serves as the entry point for the script. It reads configuration from a YAML file, +initializes logging, performs preflight checks, interacts with the GitHub API to retrieve information about the pull request, +generates a diff of the pull request, makes an AI request using the OpenAI model to generate a description based on the diff, +updates the description of the pull request, and sets GitHub Action outputs. + +Example usage: +-------------- +$ python3 main.py + """ import os import sys @@ -16,6 +25,12 @@ def main(): + """ + The main function that serves as the entry point for the script. + + Returns: + None + """ config = parse.Yaml('config.yaml').conf logs.init(config) env = preflight.Env(config)